BAD_PARAM.java revision 608:7e06bf1dcb09
1161754Sru/*
288276Smarkm * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
388276Smarkm * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
47527Sjkh *
57527Sjkh * This code is free software; you can redistribute it and/or modify it
67527Sjkh * under the terms of the GNU General Public License version 2 only, as
77527Sjkh * published by the Free Software Foundation.  Oracle designates this
87527Sjkh * particular file as subject to the "Classpath" exception as provided
97527Sjkh * by Oracle in the LICENSE file that accompanied this code.
107527Sjkh *
117527Sjkh * This code is distributed in the hope that it will be useful, but WITHOUT
127527Sjkh * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
137527Sjkh * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
147527Sjkh * version 2 for more details (a copy is included in the LICENSE file that
157527Sjkh * accompanied this code).
16161754Sru *
177527Sjkh * You should have received a copy of the GNU General Public License version
187527Sjkh * 2 along with this work; if not, write to the Free Software Foundation,
197527Sjkh * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
207527Sjkh *
217527Sjkh * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
227527Sjkh * or visit www.oracle.com if you need additional information or have any
237527Sjkh * questions.
247527Sjkh */
257527Sjkh
267527Sjkhpackage org.omg.CORBA;
277527Sjkh
287527Sjkh/**
297527Sjkh * Exception  thrown
307527Sjkh * when a parameter passed to a call is out of range or
317527Sjkh * otherwise considered illegal. An ORB may raise this exception
327527Sjkh * if null values or null pointers are passed to an operation (for
3388276Smarkm * language mappings where the concept of a null pointers or null
3488276Smarkm * values applies). BAD_PARAM can also be raised as a result of a
3588276Smarkm * client generating requests with incorrect parameters using the DII. <P>
367527Sjkh * It contains a minor code, which gives more detailed information about
3728365Scharnier * what caused the exception, and a completion status. It may also contain
387527Sjkh * a string describing the exception.
39161754Sru *
4028365Scharnier * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
417527Sjkh * Java&nbsp;IDL exceptions</A>
427527Sjkh * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">meaning of
437527Sjkh * minor codes</A>
447527Sjkh * @since       JDK1.2
457527Sjkh */
467527Sjkh
477527Sjkhpublic final class BAD_PARAM extends SystemException {
4888276Smarkm
4988276Smarkm    /**
507527Sjkh     * Constructs a <code>BAD_PARAM</code> exception with a default
517527Sjkh     * minor code of 0 and a completion state of COMPLETED_NO.
527527Sjkh     */
53161754Sru    public BAD_PARAM() {
547527Sjkh        this("");
557527Sjkh    }
56161754Sru
57161754Sru    /**
58161754Sru     * Constructs a <code>BAD_PARAM</code> exception with the specified detail
59161754Sru     * message, a minor code of 0, and a completion state of COMPLETED_NO.
6088276Smarkm     *
617527Sjkh     * @param s the String containing a detail message describing this
627527Sjkh     *          exception
637527Sjkh     */
647527Sjkh    public BAD_PARAM(String s) {
657527Sjkh        this(s, 0, CompletionStatus.COMPLETED_NO);
667527Sjkh    }
677527Sjkh
6888276Smarkm    /**
6988276Smarkm     * Constructs a <code>BAD_PARAM</code> exception with the specified
707527Sjkh     * minor code and completion status.
7188276Smarkm     * @param minor the minor code
72161754Sru     * @param completed the completion status
737527Sjkh     */
7488276Smarkm    public BAD_PARAM(int minor, CompletionStatus completed) {
7588276Smarkm        this("", minor, completed);
7688276Smarkm    }
7788276Smarkm
787527Sjkh    /**
797527Sjkh     * Constructs a <code>BAD_PARAM</code> exception with the specified detail
807527Sjkh     * message, minor code, and completion status.
817527Sjkh     * A detail message is a <code>String</code> that describes
827527Sjkh     * this particular exception.
837527Sjkh     *
8488276Smarkm     * @param s the <code>String</code> containing a detail message
857527Sjkh     * @param minor the minor code
867527Sjkh     * @param completed the completion status
877527Sjkh     */
887527Sjkh    public BAD_PARAM(String s, int minor, CompletionStatus completed) {
897527Sjkh        super(s, minor, completed);
907527Sjkh    }
917527Sjkh}
9288276Smarkm