classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Classpath Linuxtag meeting minutes


From: Andy Walter
Subject: Re: GNU Classpath Linuxtag meeting minutes
Date: Tue, 15 Jul 2003 13:39:34 +0200

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 address@hidden 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]