On Monday 14 July 2003 18:08, Per Bothner wrote: > Mark Wielaard wrote: > > - [NotYetImplementedException] > > In the gcj list I suggested UnsupportedOperationException, with a > refinement: > > throw new UnsupportedOperationException (REASON); > where REASON is a string literal that includes "not implemented" > and all on a single line (to make it easy to grep for).
What about subclassing UnsupportedOperationException like this: --- cut --- package gnu.org.classpath; public class NYIException extends UnsupportedOperationException { static String nyi = "This method has not yet been implemented in GNU Classpath. Please " + "contact [EMAIL PROTECTED] if you want to use it."; public NYIException() { super(nyi); } public NYIException(String s) { super(s + "\n" + nyi); } } --- cut --- Thus, we make sure the user always receives a helpful description and it is easy for VM implementations to replace the contact information by whatever else. I prefer grepping for class names to grepping for strings because there are no undetected typos in class names. Cheers, Andy. -- aicas GmbH /"\ ASCII Ribbon Campaign Haid-und-Neu-Straße 18 * 76131 Karlsruhe \ / No HTML or RTF in mail http://www.aicas.com X No MS-Word in mail Tel: +49-721-663 968-24; Fax: +49-721-663 968-94 / \ Respect Open Standards _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath