Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
detect BLOAD errors?
#1
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!"
Reply
#2
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..
Reply
#3
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!"
Reply
#4
Probably tomorrow, i hope..
Reply
#5
Hurray! (I don't have the time/initiative to fight with CVS)
Reply
#6
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 Big Grin
Reply
#7
Even better, a Try-Catch-Finally block. Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)