ExitOnError() not working?

Report any Hollywood bugs here
Post Reply
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

ExitOnError() not working?

Post 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         
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: ExitOnError() not working?

Post 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.
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Re: ExitOnError() not working?

Post by lazi »

Post Reply