assert(exp)
throws an exception if exp is null
assert(exp)
throws an exception if exp is null
OK. Have you tried it?yes with my configuration
What do you expect to happen?crash Code::Blocks !!!
Who is going to catch it?I do not know, this is why I ask questions?
crash Code::Blocks !!!Why?
What do you expect to happen?in fact, this is what happened during the test
local board = null;
assert(board)
I tried the code in "Scripting console", there will pop an error message box, and no crash of C::B.CodeThis exception should be recovered by "Code::Blocks" to notify the user ?local board = null;
assert(board)
Welcome to the script console!
> local board = null;
> assert(board)
AN ERROR HAS OCCURED [the index 'board' does not exist]
CALLSTACK
*FUNCTION [main()] ScriptConsole line [1]
LOCALS
[this] TABLE
AN ERROR HAS OCCURED [the index 'board' does not exist]
CALLSTACK
*FUNCTION [main()] ScriptConsole line [1]
LOCALS
[this] TABLE