classpath
[Top][All Lists]
Advanced

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

NYIException


From: Ingo Prötel
Subject: NYIException
Date: Tue, 23 Sep 2003 16:56:23 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Hi,

I would like to again propose a standard NYIException to be used in Classpath.

I have taken earlier postings this list and copied them into a java-file. I have attached the result.

I would like your comments. If nobody complains I will put it in.

One open issue with this approach is that we are not able to differentiate between features of different Java releases.
To solve this we could have subclasses of this exception:

NYI14Exception -- new feature in release 1.4
NYI13Exception -- new feature in release 1.3
...

This would make a grep really easy.

--ingo
/* NYIException.java -- Exception signaling not yet implemented methods
   Copyright (C) 2003  Free Software Foundation

This file is part of GNU Classpath.

GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING.  If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.

Linking this library statically or dynamically with other modules is
making a combined work based on this library.  Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module.  An independent module is a module which is not derived from
or based on this library.  If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so.  If you do not wish to do so, delete this
exception statement from your version. */
package gnu.org.classpath;

/**
 * This Exception is used to signal that a particular method has not 
 * been implemented yet. The use of a specific exception throught the
 * complete source code will help to localize and implement missing
 * functionality.<p>
 * Usage:
 * <code><pre>
 *  public notYetImplementeMethod()
 *    {
 *    throw new gnu.classpath.NYIException();
 *    }
 *  </pre></code>
 *
 */
public class NYIException extends UnsupportedOperationException 
{
        private static final String NYI =
                  "This method has not yet been implemented in GNU 
Classpath.\n\n"
                + " The GNU Classpath project would appreciate receiving"
                + " an implementation for it.\n"
                + " If you intend to contribute, please take a look at"
                + " http://www.gnu.org/software/classpath/docs/hacking.html and"
                + " get in touch with other developers on address@hidden"; 
  
  /**
   * Create new NYIException.
   */
  public NYIException()
    {
        super(NYI);
    }

  /**
   * Create new NYIException with detailed message.
   * @param message more detailed description.
   */
  public NYIException(String message) 
    {
        super(message + "\n" + NYI);
    }
}


reply via email to

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