Re: HOWTO: Re-raise an error?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Mon, 04 Sep 2006 12:45:31 -0500, Ian Boyd <ian.msnews010@xxxxxxxxxxxx> wrote:

The maddening, pull out your hair, scream at the world, attack co-workers
with a baseball bat, frustrating part of all this is that these subtlties
are not documented, and no examples anywhere deal with real world exception
handling.

Well, if you look at any of the scripts Microsoft ships with IIS, error handling is done by just checking Err.Number anywhere they expect something to have failed. That's not too surprising, since that's pretty much how you handle errors in C/C++ -- you religiously check the HRESULT returned by whatever you called. From that perspective, examples of "real world exception handling" are documented, but there are more practical ways of doing it.

What would be really nice would be something along the lines of the Python Cookbook[1] on ActiveState's website. Let people who are using the language in the field submit their idiomatic recipes. Ideally, if you know what you're looking for in terms of another language (e.g. try/catch/finally), you could find out whether anyone's thought of a good way to simulate it in VBScript.

[1] ActiveState O'Reilly Python cookbook code samples ratings review
http://aspn.activestate.com/ASPN/Cookbook/Python

--
Justin Piper
Bizco Technologies
http://www.bizco.com/
.



Relevant Pages

  • Re: Practical error/exception handling...
    ... Could I humbly suggest that the requirement for a 'standard' way of handling ... But I only need the exception handler in ... > and is informative to both user and developer when errors occur. ...
    (alt.comp.lang.borland-delphi)
  • Re: Error handling - Resume vs Exit
    ... I always wondered why Access wizards created simple exception ... handling code in the fashion they do. ... Use a separate subroutine for each try block. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Was not making tail recursion elmination a mistake?
    ... Not the language; the implementation techniques. ... there is a myth out there saying "don't use exception ... > handling, for it's dog slow". ...
    (comp.lang.lisp)
  • Re: Implementing Exception Handling in a VM
    ... Given that the implementing language has SEH, can ... I leverage this fact to add exception support in my Pascal-like ... handling system in your VM. ...
    (comp.compilers)
  • Re: Ignore SQL Server 2000 store proc errors and still get results?
    ... catch (Exception ex) ... > You definitely don't want to do 30 round trips by handling the logic ... > temp table in your stored procedure to handle the collection of valid ... >>> expensive in both server and client code. ...
    (microsoft.public.dotnet.framework.adonet)