public class UserError extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
UserError.UserException
UserException type for all errors that should be reported to the SVM users.
|
| Constructor and Description |
|---|
UserError() |
| Modifier and Type | Method and Description |
|---|---|
static UserError.UserException |
abort(Iterable<String> messages)
Stop compilation immediately and report the message to the user.
|
static UserError.UserException |
abort(String format,
Object... args)
Stop compilation immediately and report the message to the user.
|
static UserError.UserException |
abort(Throwable cause,
String format,
Object... args)
Stop compilation immediately and report the message to the user.
|
static Object[] |
formatArguments(Object... args)
Processes
args to convert selected values to strings. |
static void |
guarantee(boolean condition,
String format,
Object... args)
Concisely reports user errors.
|
public static UserError.UserException abort(String format, Object... args)
format - format stringargs - arguments for the format string that are preprocessed before being sent to String.format(String, Object...)public static UserError.UserException abort(Throwable cause, String format, Object... args)
cause - the exception that caused the abort.format - format stringargs - arguments for the format string that are preprocessed before being sent to String.format(String, Object...)public static void guarantee(boolean condition,
String format,
Object... args)
format - format stringargs - arguments for the format string that are preprocessed before being sent to String.format(String, Object...)public static Object[] formatArguments(Object... args)
args to convert selected values to strings.
ResolvedJavaType is converted with JavaType.toJavaName()
(true).ResolvedJavaMethod is converted with JavaMethod.format(java.lang.String)
("%H.%n($p)").ResolvedJavaField is converted with JavaField.format(java.lang.String)
("%H.%n").args - arguments to processargs with certain values converted to strings as described abovepublic static UserError.UserException abort(Iterable<String> messages)
messages - the error message to be reported to the user.