001 /* BAD_OPERATION.java --
002 Copyright (C) 2005, 2006 Free Software Foundation, Inc.
003
004 This file is part of GNU Classpath.
005
006 GNU Classpath is free software; you can redistribute it and/or modify
007 it under the terms of the GNU General Public License as published by
008 the Free Software Foundation; either version 2, or (at your option)
009 any later version.
010
011 GNU Classpath is distributed in the hope that it will be useful, but
012 WITHOUT ANY WARRANTY; without even the implied warranty of
013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014 General Public License for more details.
015
016 You should have received a copy of the GNU General Public License
017 along with GNU Classpath; see the file COPYING. If not, write to the
018 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
019 02110-1301 USA.
020
021 Linking this library statically or dynamically with other modules is
022 making a combined work based on this library. Thus, the terms and
023 conditions of the GNU General Public License cover the whole
024 combination.
025
026 As a special exception, the copyright holders of this library give you
027 permission to link this library with independent modules to produce an
028 executable, regardless of the license terms of these independent
029 modules, and to copy and distribute the resulting executable under
030 terms of your choice, provided that you also meet, for each linked
031 independent module, the terms and conditions of the license of that
032 module. An independent module is a module which is not derived from
033 or based on this library. If you modify this library, you may extend
034 this exception to your version of the library, but you are not
035 obligated to do so. If you do not wish to do so, delete this
036 exception statement from your version. */
037
038
039 package org.omg.CORBA;
040
041 import java.io.Serializable;
042
043 /**
044 * Means that the object exists but does not support the operation that was
045 * invoked on it.
046 *
047 * In GNU Classpath, this exception may have the following Minor codes:
048 *
049 * <table border="1">
050 * <tr>
051 * <th>Hex</th>
052 * <th>Dec</th>
053 * <th>Minor</th>
054 * <th>Name</th>
055 * <th>Case</th>
056 * </tr>
057 * <tr>
058 * <td>47430000</td>
059 * <td>1195573248 </td>
060 * <td>0</td>
061 * <td>Method</td>
062 * <td> The remote side requested to invoke the method that is not available on
063 * that target (client and server probably disagree in the object definition).
064 * This code is set when the problem arises in the Classpath core; the idlj and
065 * rmic may generate the user code that sets 0x0 or other value.</td>
066 * </tr>
067 * <tr>
068 * <td>47430009</td>
069 * <td>1195573257</td>
070 * <td>9</td>
071 * <td>Any</td>
072 * <td> Attempt to extract from the Any value of the different type that was
073 * stored into that Any. </td>
074 * </tr>
075 * <tr>
076 * <td>4743000a</td>
077 * <td>1195573258</td>
078 * <td>10</td>
079 * <td>Activation</td>
080 * <td>Failed to activate the inactive object due any reason.</td>
081 * </tr>
082 * <tr>
083 * <td>4743000b</td>
084 * <td>1195573259</td>
085 * <td>11</td>
086 * <td>Policy</td>
087 * <td> The policies, applying to ORB or POA prevent the requested operation.
088 * </td>
089 * </tr>
090 * <tr>
091 * <td>4743000c</td>
092 * <td>1195573260</td>
093 * <td>12</td>
094 * <td>Socket</td>
095 * <td> Socket related errors like failure to open socket on the expected port.</td>
096 * </tr>
097 * <tr>
098 * <td>4743000e</td>
099 * <td>1195573262</td>
100 * <td>14</td>
101 * <td>Enumeration</td>
102 * <td> The passed value for enumeration is outside the valid range for that
103 * enumeration. </td>
104 * </tr>
105 * <tr>
106 * <td>4743000f</td>
107 * <td>1195573263</td>
108 * <td>15</td>
109 * <td>PolicyType</td>
110 * <td> The passed policy code is outside the valid range of the possible
111 * policies for the given policy type. </td>
112 * </tr>
113 * </table>
114 *
115 * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
116 */
117 public final class BAD_OPERATION
118 extends SystemException
119 implements Serializable
120 {
121 /**
122 * Use serialVersionUID for interoperability.
123 */
124 private static final long serialVersionUID = 1654621651720499682L;
125
126 /**
127 * Creates a BAD_OPERATION with the default minor code of 0, completion state
128 * COMPLETED_NO and the given explaining message.
129 *
130 * @param message the explaining message.
131 */
132 public BAD_OPERATION(String message)
133 {
134 super(message, 0, CompletionStatus.COMPLETED_NO);
135 }
136
137 /**
138 * Creates BAD_OPERATION with the default minor code of 0 and a completion
139 * state COMPLETED_NO.
140 */
141 public BAD_OPERATION()
142 {
143 super("", 0, CompletionStatus.COMPLETED_NO);
144 }
145
146 /**
147 * Creates a BAD_OPERATION exception with the specified minor code and
148 * completion status.
149 *
150 * @param minor additional error code.
151 * @param completed the method completion status.
152 */
153 public BAD_OPERATION(int minor, CompletionStatus completed)
154 {
155 super("", minor, completed);
156 }
157
158 /**
159 * Created BAD_OPERATION exception, providing full information.
160 *
161 * @param reason explaining message.
162 * @param minor additional error code (the "minor").
163 * @param completed the method completion status.
164 */
165 public BAD_OPERATION(String reason, int minor, CompletionStatus completed)
166 {
167 super(reason, minor, completed);
168 }
169 }