[prog] Java exceptions: finding out the source

Teri Solow tsolow at terisolow.com
Tue Jun 29 08:08:17 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mary imparted (2004-06-29 @ 16:14:20 +1000):
> I'd still be interested in people's thoughts on what makes Java produce
> such a useless error message...

Java seems to expect that one would know every place where a problem
MAY occur while programming..... (such as when working with nontrivial
I/O, or running stuff included from an external source) to get useful
errors, sometimes you actually have to 'throw' and 'catch' exceptions
in your code.

Basically, in pseudocode because I've avoided Java for the past year
or so: (IIRC)
	throw (exception e) {
		do stuff that should generally work;
	} catch (e) {
		dude!  you broke it like this: e;
	}
Which if MUCH uglier than:
	"do stuff that should generally work" or die "dude!  you broke it like this: $!";
but kindasorta similar.   Kinda.

Sorry I can't be of more help, although I was forced to use Java in
all my CS classes, I am not incredibly fond of it except in instances
where swing would be useful to make a cross-platform user interface.

- -- 
(n_	Teri Solow
//\	http://terisolow.com
V_/_

A man who keeps stealing mopeds is an obvious cycle-path.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA4VuxCRjPPiFbVe8RAqbHAJ9BI0DS2NGeWX7bLhHBwsUHggyMNACfb42E
RHCRV7K3OzcL3IqGAyFzyCs=
=BrBg
-----END PGP SIGNATURE-----


More information about the Programming mailing list