org.stjs.generator.javac
Class ErrorReporter

java.lang.Object
  extended by org.stjs.generator.javac.ErrorReporter

public final class ErrorReporter
extends Object

Handle errors detected in utility classes. By default, the error reporter throws a RuntimeException, but clients of the utility library may register a handler to change the behavior. For example, type checkers can direct errors to the checkers.source.SourceChecker class.


Method Summary
static void errorAbort(String msg)
          Log an error message and abort processing.
static void errorAbort(String msg, Throwable cause)
           
static void setHandler(ErrorHandler h)
          Register a handler to customize error reporting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setHandler

public static void setHandler(ErrorHandler h)
Register a handler to customize error reporting.


errorAbort

public static void errorAbort(String msg)
Log an error message and abort processing. Call this method instead of raising an exception.

Parameters:
msg - The error message to log.

errorAbort

public static void errorAbort(String msg,
                              Throwable cause)


Copyright © 2014. All Rights Reserved.