Adding a constructor to AssertionError that takes throwable (original) (raw)
Paulo Levi i30817 at gmail.com
Sun Jan 10 08:33:35 UTC 2010
- Previous message: The new Objects class
- Next message: Adding a constructor to AssertionError that takes throwable
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi. A funtion i had to implement is one that returns a assertionerror given a msg and a throwable (initCause with the throwable) simply because it's such a common pattern to throw a assertionerror on "impossible" (buggy) exceptions. Without the cause, it's sometimes hard to guess the problem without recompiling the code more than once.
I'd like another constructor in AssertionError (that takes a msg and a throwable).
As i said i did this on a static function, so it's not important to me, but might simplify things for others (-3 lines of code in catch clauses). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20100110/c70a7a0e/attachment.html>
- Previous message: The new Objects class
- Next message: Adding a constructor to AssertionError that takes throwable
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]