Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Provide more meaningful error messages

AuthorDaveJarvis <email>
Date2021-05-11 20:32:39 GMT-0700
Commitb2f416f7fc5f1d1754e4b7ce8fdbf65b4cd86b4c
Parentc4dde59
Delta5 lines added, 5 lines removed
src/main/java/com/keenwrite/events/StatusEvent.java
// Subclasses of RuntimeException must be subject to Englishification.
- if( problem.getClass().equals( RuntimeException.class ) &&
- (problem = problem.getCause()) == null ) {
- return "";
+ if( problem.getClass().equals( RuntimeException.class ) ) {
+ final var cause = problem.getCause();
+ return cause == null ? problem.getMessage() : cause.getMessage();
}
*/
public static void clue( final Throwable problem ) {
- fireStatusEvent( "", problem );
+ fireStatusEvent( problem.getMessage(), problem );
}
installer.sh
set SCRIPT_DIR=%~dp0
-"%SCRIPT_DIR%\\${ARG_JAVA_DIR}\\bin\\java" ${OPT_JAVA} -jar "%SCRIPT_DIR%\\${APP_NAME}.jar" %*
+"%SCRIPT_DIR%\\${ARG_JAVA_DIR}\\bin\\java" ${OPT_JAVA} -jar "%SCRIPT_DIR%\\${APP_NAME}.jar" %* 2>nul
__EOT