- changed milestone to 3.0.5
error function ignores call level
Issue #42
resolved
The Java side of the error
function of MobTalkerScript looks like this:
@MtsNativeFunction( "error" ) public static void error( MtsVarargs args ) { throw new MtsRuntimeException( args.get( 0 ).toMtsString().toJava(), checkInteger( args, 1, 1 ) - 1 ); }
However, the constructor of MtsRuntimeException
that allows the specification of a call level has the following signature:
public MtsRuntimeException(int level, String msg, Object... args)
Hence, a different constructor of MtsRuntimeException
is called, which results in the call level parameter to be ignored (unless there's a %d
in the error message).
Comments (4)
-
reporter -
reporter - changed status to open
-
reporter -
assigned issue to
-
assigned issue to
-
reporter - changed status to resolved
Ensure the correct MtsRuntimeException constructor is called in MtsBaseLib.error (fixes
#42)→ <<cset 3cb5fc7ae89f>>
- Log in to comment