Page 1 of 1

ExitOnError() not working?

Posted: Mon Apr 25, 2016 12:19 am
by lazi
If I don't misunderstand something this code should not exit with a division by zero requester. But it does.

Code: Select all

DebugPrint("1")

ExitOnError(False)
cucc=1/0
code=GetLastError()
ExitOnError(True)

DebugPrint("2")

Repeat
	WaitEvent
Forever         

Re: ExitOnError() not working?

Posted: Fri Apr 29, 2016 4:35 pm
by airsoftsoftwair
That's normal behaviour. ExitOnError() will only catch standard errors thrown by functions. Lowlevel VM errors like wrong parameter types, division by zero, etc. can't be caught by ExitOnError() and will throw anyway.

Re: ExitOnError() not working?

Posted: Tue May 03, 2016 10:21 pm
by lazi