For me, following my own advice means giving up my old bar buddies IllegalArgumentException and IllegalStateException. I think the only reason is that everything under StandardError has sometime to do with the current operation while stuff outside of StandardError deals more with the runtime environment. Checked exceptions are one of Java's few true innovations. We are using exceptions in critical systems critical to us is threads sending data packets at 50 Hz, that is each 20ms, with CORBA for a total of 15k packets per second and all CORBA errors are handled as exceptions. These developers seems to have a plan for exception handling, which essentially involves catching all exceptions at the boundary of the application, and simply show the exception message to the end user. Just look at the last line:
Then again about error prone-ness if that is legal english , if you have a class that holds a resource database connection in Java you must know when it is going out of scope so that you can call. Users shouldn't see technical error messages and they really don't care about them. Subscribe To Posts Atom. Rescuing Exceptions Inside Methods If we are inside a method and we want to rescue some exceptions, we don't actually need a begin.. If you don't know the context, then how can you write an appropriate message for an end user? If we wrap some code in a begin.. Let's have a look at the JSF magician I presented a couple of days ago.
Google Testing Blog: Checked exceptions I love you, but you have to go
What if there is something more you can do to help the user beyond "computer said no"? This is interesting discussion. Having a generic LogRuntimeException seems like a good approach to this problem. Stephane September 16, at 9: Retry an outbound request level, retry an outbound connection, or cleanly fail an incoming request.
This means that it is crafted to be displayed without a stack trace, providing all the necessary context through its Message alone. All of the above arguments even implicitly assume that you're writing exception messages for a known system. In language like Python, with dynamic exceptions and GC, they are no problem, and sometimes quite elegant way to solve common problems. Are they some combination of both if you are poking your own RPC service then it's technically internal external but really just internal, you can propagate it as-is? Great infor helped me alot. They may not even speak English. Honestly, the problem here was that your platform sucked.