Josh Close writes:
> I guess I'm looking for something more like a try/catch where if
> there's an error, nothing will be displayed and the script will keep
> on going.

Exceptions don't work like that.  They aren't used to ignore errors, but to
handle them all in one place.  With things like database calls, it is just
as easy (if not easier) to simply use wrapper functions that handle all
errors.

Ignoring errors doesn't work well either.  Suppose you have a page that
retreives a list of names from the database and displays them.  If you
simply ignore MySQL errors and manage to still make everything work, you get
an empty table.  Is that really what you want?  In most cases handling
errors as they occur is the best solution.

If you want an easy, "modern" object oriented language that supports
exceptions, try Python.

Personally, I dislike exceptions for most things.  They are nice because
they guarantee that all errors will be caught (assuming you don't do
something stupid like a blanket catch).  They suck because in many cases you
need to handle errors individually as they occur.  Thus exceptions end up
being a lot more code without providing anything useful.

-- 
David Phillips <david at acz.org>
http://david.acz.org/


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list