Posts: 242
Threads: 29
Joined: Dec 2004
Trying to code some smarts into my program and can't seem to find a direct example of how to detect a BLOAD error and report it. I wanted to include this into a program after loading it up and not getting anything other than a blank screen.
I found the SCREENPTR example and have incorporated it to warn of problems and gracefully exit when a screen resolution can not be set.
ature has its way of warning a person away from danger: The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
Posts: 922
Threads: 15
Joined: Jun 2003
Been a statement, you have to use the ugly QB-ish error handling:
on error goto mybloadhandler
bload ...
on error goto 0 '' only with the lastest 0.13
mybloadhandler:
print "duh, something went wrong!"; err
resume next
You have to compile it using the -ex option.
I hate statements, don't you? What is wrong with plain-old-functions (that could also have the results skipped if people don't really care about errors)? I dunno what M$ had in its mind.. and PB makes it worse, adding hundreads of new statements and error numbers to take care.. nm..
Posts: 242
Threads: 29
Joined: Dec 2004
Speaking of "latest 0.13"...
...when will an official release be out?
ature has its way of warning a person away from danger: The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
Posts: 922
Threads: 15
Joined: Jun 2003
Probably tomorrow, i hope..
Posts: 13
Threads: 3
Joined: Feb 2005
Hurray! (I don't have the time/initiative to fight with CVS)
Posts: 3,522
Threads: 189
Joined: Dec 2003
Quote:Been a statement, you have to use the ugly QB-ish error handling:
on error goto mybloadhandler
bload ...
on error goto 0 '' only with the lastest 0.13
mybloadhandler:
print "duh, something went wrong!"; err
resume next
You have to compile it using the -ex option.
I hate statements, don't you? What is wrong with plain-old-functions (that could also have the results skipped if people don't really care about errors)? I dunno what M$ had in its mind.. and PB makes it worse, adding hundreads of new statements and error numbers to take care.. nm..
Just a suggestion, how about:
Code:
on error errorfunction
Instead of doing a gosub it enters a function/sub?
Just a thought
Posts: 63
Threads: 11
Joined: Jan 2005
Even better, a Try-Catch-Finally block.