public class JVMCIError extends Error
Modifier and Type | Field and Description |
---|---|
private ArrayList<String> |
context |
private static long |
serialVersionUID |
Constructor and Description |
---|
JVMCIError(JVMCIError e)
|
JVMCIError(String msg,
Object... args)
This constructor creates a
JVMCIError with a message assembled via
String.format(String, Object...) . |
JVMCIError(Throwable cause)
This constructor creates a
JVMCIError for a given causing Throwable instance. |
Modifier and Type | Method and Description |
---|---|
JVMCIError |
addContext(String newContext) |
JVMCIError |
addContext(String name,
Object obj) |
private static String |
format(String msg,
Object... args) |
static void |
guarantee(boolean condition,
String msg,
Object... args)
Checks a given condition and throws a
JVMCIError if it is false. |
static RuntimeException |
shouldNotReachHere() |
static RuntimeException |
shouldNotReachHere(String msg) |
static RuntimeException |
shouldNotReachHere(Throwable cause) |
String |
toString() |
static RuntimeException |
unimplemented() |
static RuntimeException |
unimplemented(String msg) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
private static final long serialVersionUID
public JVMCIError(String msg, Object... args)
JVMCIError
with a message assembled via
String.format(String, Object...)
. It always uses the ENGLISH locale in order to
always generate the same output.msg
- the message that will be associated with the error, in String.format syntaxargs
- parameters to String.format - parameters that implement Iterable
will be
expanded into a [x, x, ...] representation.public JVMCIError(Throwable cause)
JVMCIError
for a given causing Throwable instance.cause
- the original exception that contains additional information on this errorpublic JVMCIError(JVMCIError e)
e
- the original JVMCIError
public static RuntimeException unimplemented()
public static RuntimeException unimplemented(String msg)
public static RuntimeException shouldNotReachHere()
public static RuntimeException shouldNotReachHere(String msg)
public static RuntimeException shouldNotReachHere(Throwable cause)
public static void guarantee(boolean condition, String msg, Object... args)
JVMCIError
if it is false. Guarantees are
stronger than assertions in that they are always checked. Error messages for guarantee
violations should clearly indicate the nature of the problem as well as a suggested solution
if possible.condition
- the condition to checkmsg
- the message that will be associated with the error, in
String.format(String, Object...)
syntaxargs
- arguments to the format stringpublic JVMCIError addContext(String newContext)
public JVMCIError addContext(String name, Object obj)