You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicclassTornadoBailoutRuntimeExceptionextendsRuntimeException {
staticfinalStringRESET = "\u001B[0m";
staticfinalStringRED = "\u001B[31m";
publicTornadoBailoutRuntimeException(finalStringmsg) {
super(RED + msg + RESET);
}
publicTornadoBailoutRuntimeException(finalStringmsg, Exceptione) {
super(RED + msg + RESET, e);
}
// May be removed as well - because it's a synonim for getCause()publicThrowablegetException() {
returngetCause();
}
}
The fixed version is not only more compact, but prints exception traces correctly, because the chain of exceptions is initialized (unlike it's done currently).
The text was updated successfully, but these errors were encountered:
TornadoRuntimeException, TornadoUnimplementedException, TornadoTaskRuntimeException, TornadoBailoutRuntimeException and probably others do not follow standard Java coding practices for Exception classes and contains redundant code.
For example, TornadoBailoutRuntimeException:
CURRENTLY:
SHOULD BE:
The fixed version is not only more compact, but prints exception traces correctly, because the chain of exceptions is initialized (unlike it's done currently).
The text was updated successfully, but these errors were encountered: