1// 2// Copyright (c) ZeroC, Inc. All rights reserved. 3// 4 5declare module "ice" 6{ 7 namespace Ice 8 { 9 /** 10 * Base class for all Ice exceptions. 11 */ 12 abstract class Exception extends Error 13 { 14 /** 15 * Returns the name of this exception. 16 * 17 * @return The name of this exception. 18 * 19 * @deprecated ice_name() is deprecated, use ice_id() instead. 20 **/ 21 ice_name():string; 22 23 /** 24 * Returns the type id of this exception. 25 * 26 * @return The type id of this exception. 27 **/ 28 ice_id():string; 29 30 /** 31 * Returns a string representation of this exception. 32 * 33 * @return A string representation of this exception. 34 **/ 35 toString():string; 36 37 ice_cause:string|Error; 38 } 39 40 /** 41 * Base class for all Ice run-time exceptions. 42 */ 43 abstract class LocalException extends Exception {} 44 45 /** 46 * Base class for all Ice user exceptions. 47 */ 48 abstract class UserException extends Exception 49 { 50 /** 51 * Obtains the sliced data associated with this instance. 52 * @return The sliced data if the exception has a preserved-slice base class and has been sliced during 53 * unmarshaling of the exception, nil otherwise. 54 */ 55 ice_getSlicedData():SlicedData; 56 57 /** 58 * Obtains the Slice type ID of this exception. 59 * @return The fully-scoped type ID. 60 */ 61 static ice_staticId():string; 62 } 63 } 64} 65