39 |
package gnu.javax.rmi.CORBA; |
package gnu.javax.rmi.CORBA; |
40 |
|
|
41 |
import gnu.CORBA.Functional_ORB; |
import gnu.CORBA.Functional_ORB; |
42 |
|
import gnu.CORBA.Minor; |
43 |
import gnu.CORBA.Unexpected; |
import gnu.CORBA.Unexpected; |
44 |
import gnu.CORBA.CDR.Vio; |
import gnu.CORBA.CDR.Vio; |
45 |
import gnu.CORBA.CDR.gnuRuntime; |
import gnu.CORBA.CDR.gnuRuntime; |
210 |
catch (Exception ex) |
catch (Exception ex) |
211 |
{ |
{ |
212 |
MARSHAL m = new MARSHAL("Cannot write " + object); |
MARSHAL m = new MARSHAL("Cannot write " + object); |
213 |
|
m.minor = Minor.ValueFields; |
214 |
m.initCause(ex); |
m.initCause(ex); |
215 |
throw m; |
throw m; |
216 |
} |
} |
248 |
output.write_value((Serializable) object, xClass); |
output.write_value((Serializable) object, xClass); |
249 |
} |
} |
250 |
else |
else |
251 |
throw new MARSHAL(xClass + " is not Serializable"); |
{ |
252 |
|
MARSHAL m = new MARSHAL(xClass + " is not Serializable"); |
253 |
|
m.minor = Minor.NonSerializable; |
254 |
|
throw m; |
255 |
|
} |
256 |
} |
} |
257 |
|
|
258 |
/** |
/** |
281 |
if (fc == null) |
if (fc == null) |
282 |
fc = interfaces[i]; |
fc = interfaces[i]; |
283 |
else |
else |
284 |
throw new MARSHAL("Both " + fc + " and " + interfaces[i] |
{ |
285 |
|
MARSHAL m = new MARSHAL("Both " + fc + " and " + interfaces[i] |
286 |
+ " extends Remote"); |
+ " extends Remote"); |
287 |
|
m.minor = Minor.TargetConversion; |
288 |
|
throw m; |
289 |
|
} |
290 |
} |
} |
291 |
} |
} |
292 |
if (fc == null) |
if (fc == null) |
293 |
throw new MARSHAL(object.getClass() |
{ |
294 |
|
MARSHAL m = new MARSHAL(object.getClass() |
295 |
+ " does not implement any interface, derived from Remote"); |
+ " does not implement any interface, derived from Remote"); |
296 |
|
m.minor = Minor.TargetConversion; |
297 |
|
throw m; |
298 |
|
} |
299 |
return fc; |
return fc; |
300 |
} |
} |
301 |
|
|
514 |
catch (Exception ex) |
catch (Exception ex) |
515 |
{ |
{ |
516 |
MARSHAL m = new MARSHAL("Unable to export " + implementation); |
MARSHAL m = new MARSHAL("Unable to export " + implementation); |
517 |
|
m.minor = Minor.TargetConversion; |
518 |
m.initCause(ex); |
m.initCause(ex); |
519 |
throw m; |
throw m; |
520 |
} |
} |
598 |
catch (Exception ex) |
catch (Exception ex) |
599 |
{ |
{ |
600 |
MARSHAL m = new MARSHAL("writeExternal failed"); |
MARSHAL m = new MARSHAL("writeExternal failed"); |
601 |
|
m.minor = Minor.Value; |
602 |
m.initCause(ex); |
m.initCause(ex); |
603 |
throw m; |
throw m; |
604 |
} |
} |
731 |
{ |
{ |
732 |
MARSHAL m = new MARSHAL("Cannot get stub from interface " |
MARSHAL m = new MARSHAL("Cannot get stub from interface " |
733 |
+ clz.getClass().getName()); |
+ clz.getClass().getName()); |
734 |
|
m.minor = Minor.TargetConversion; |
735 |
m.initCause(e); |
m.initCause(e); |
736 |
throw m; |
throw m; |
737 |
} |
} |
858 |
catch (Exception e) |
catch (Exception e) |
859 |
{ |
{ |
860 |
MARSHAL m = new MARSHAL("Unable to instantiate " + clz); |
MARSHAL m = new MARSHAL("Unable to instantiate " + clz); |
861 |
|
m.minor = Minor.Instantiation; |
862 |
m.initCause(e); |
m.initCause(e); |
863 |
throw m; |
throw m; |
864 |
} |
} |
931 |
MARSHAL m = new MARSHAL("Cannot read " + o_class.getName() + " field " |
MARSHAL m = new MARSHAL("Cannot read " + o_class.getName() + " field " |
932 |
+ f); |
+ f); |
933 |
m.initCause(ex); |
m.initCause(ex); |
934 |
m.printStackTrace(); |
m.minor = Minor.ValueFields; |
935 |
throw m; |
throw m; |
936 |
} |
} |
937 |
} |
} |