Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Modula 3 > exception schem...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 54 of 149
Post > Topic >>

exception scheme in m3na

by Henning Thielemann <iakd0@[EMAIL PROTECTED] > Aug 19, 2003 at 11:21 AM

There is still a design decision to be made for the m3na library, but it
may arise in other projects, too: How to handle exceptions?

The situation in the m3na (numerical analysis) library is that several
exception may be raised for reasons like overflow, division by zero,
vectors of non-matching sizes, physical quantities with different units,
failing convergence. The current approach is to use a single exception
which accepts an enumeration type parameter which specifies the actual
type of error. But some of the exceptions may provide more information to
the exception handler. I can imagine two kinds of solution:
 1. Use different exceptions for different errors.
 2. Use one exception that is global with respect to the library. The
exception has an object as parameter and the class of the object specifies
the kind of the error. Subcl***** may contained more detailed information
for the specific error.

The first alternative allows for easy tracking of what errors can occur
when calling a routine but it may end in long RAISES lists that are hard
to maintain. The second alternative negates both statements.

Has someone experiences with this design decision or is there someone who
can give hints and conventions for using exceptions in general?
 




 6 Posts in Topic:
exception scheme in m3na
Henning Thielemann <ia  2003-08-19 11:21:54 
Re: exception scheme in m3na
Olaf Wagner <wagner@[E  2003-08-20 08:03:33 
Re: exception scheme in m3na
Henning Thielemann <ia  2003-08-20 16:50:13 
Re: exception scheme in m3na
"Randy Coleburn"  2003-08-22 00:07:53 
Re: exception scheme in m3na
Henning Thielemann <ia  2003-08-22 12:47:08 
Re: exception scheme in m3na
"Randy Coleburn"  2003-08-22 21:20:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 5:32:09 CDT 2008.