When consoleTrace is set to false, exceptions in commands will lead to useless messages:
Exception occurred in method: failFunction
This is caused by the fact that com.badlogic.gdx.utils.reflect.invoke() wraps the TargetInvokationException with a ReflectionException with that predefined message, therefore the check for an empty message in AbstractConsole is never true in that case.
When
consoleTrace
is set to false, exceptions in commands will lead to useless messages:Exception occurred in method: failFunction
This is caused by the fact that
com.badlogic.gdx.utils.reflect.invoke()
wraps theTargetInvokationException
with aReflectionException
with that predefined message, therefore the check for an empty message inAbstractConsole
is never true in that case.With this change the example
failFunction
command inBox2DTest
will print the much more helpful:Only tested on desktop. If it causes issues with GWT, the import might need to be avoided, but so far untested.