User forums > Embedded development

script wizard and assert()

<< < (2/3) > >>

oBFusCATed:

--- Quote from: LETARTARE on June 11, 2013, 11:08:15 am ---crash Code::Blocks !!!

--- End quote ---
Why?
But I'm sure it won't happen, probably you'll get an error in the log or it will be silently ignored.

LETARTARE:
I think I misunderstood

--- Quote ---What do you expect to happen?
--- End quote ---
in fact, this is what happened during the test

--- Code: ---local board = null;
assert(board)
--- End code ---

This exception should be recovered by "Code::Blocks" to notify the user ?
This is not the case.

oBFusCATed:
I don't understand sorry. Please explain better or provide a sample script.

ollydbg:

--- Quote from: LETARTARE on June 11, 2013, 12:24:55 pm ---
--- Code: ---local board = null;
assert(board)
--- End code ---
This exception should be recovered by "Code::Blocks" to notify the user ?

--- End quote ---
I tried the code in "Scripting console", there will pop an error message box, and no crash of C::B.

--- Quote ---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

--- End quote ---

ollydbg:
If I add the code in a project wizard script, then I see a message box said: script error has occurred, please press yes to see the exact errors.

Then I click Yes, there will be a dialog to show the detailed error messages. Still no crash of C::B.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version