com.sun.tools.javac.util.PropagatedException Java Examples
The following examples show how to use
com.sun.tools.javac.util.PropagatedException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Main.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
/** * Report a usage error. */ void error(String key, Object... args) { if (apiMode) { String msg = getLocalizedString(key, args); throw new PropagatedException(new IllegalStateException(msg)); } warning(key, args); Log.printLines(out, getLocalizedString("msg.usage", ownName)); }
Example #2
Source File: Arguments.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 5 votes |
void error(Option.InvalidValueException f) { String msg = f.getMessage(); errors = true; switch (errorMode) { case ILLEGAL_ARGUMENT: { throw new PropagatedException(new IllegalArgumentException(msg, f.getCause())); } case ILLEGAL_STATE: { throw new PropagatedException(new IllegalStateException(msg, f.getCause())); } case LOG: log.printRawLines(ownName + ": " + msg); } }
Example #3
Source File: Main.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** Report a usage error. */ void error(String key, Object... args) { if (apiMode) { String msg = log.localize(PrefixKind.JAVAC, key, args); throw new PropagatedException(new IllegalStateException(msg)); } warning(key, args); log.printLines(PrefixKind.JAVAC, "msg.usage", ownName); }
Example #4
Source File: Main.java From javaide with GNU General Public License v3.0 | 5 votes |
/** * Report a usage error. */ void error(String key, Object... args) { if (apiMode) { String msg = getLocalizedString(key, args); throw new PropagatedException(new IllegalStateException(msg)); } warning(key, args); Log.printLines(out, getLocalizedString("msg.usage", ownName)); }
Example #5
Source File: Arguments.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
void error(Option.InvalidValueException f) { String msg = f.getMessage(); errors = true; switch (errorMode) { case ILLEGAL_ARGUMENT: { throw new PropagatedException(new IllegalArgumentException(msg, f.getCause())); } case ILLEGAL_STATE: { throw new PropagatedException(new IllegalStateException(msg, f.getCause())); } case LOG: log.printRawLines(ownName + ": " + msg); } }