import {Ice} from 'ice'; import '../Ice/Identity'; import '../Ice/Version'; import '../Ice/BuiltinSequences'; declare module './Ice.ns' { namespace Ice { /** * This exception is raised when a failure occurs during initialization. */ class InitializationException extends Ice.LocalException { constructor(reason?: string); /** * The reason for the failure. */ reason: string; } /** * This exception indicates that a failure occurred while initializing * a plug-in. */ class PluginInitializationException extends Ice.LocalException { constructor(reason?: string); /** * The reason for the failure. */ reason: string; } /** * This exception is raised if a feature is requested that is not * supported with collocation optimization. */ class CollocationOptimizationException extends Ice.LocalException {} /** * An attempt was made to register something more than once with * the Ice run time. * * This exception is raised if an attempt is made to register a * servant, servant locator, facet, value factory, plug-in, object * adapter, object, or user exception factory more than once for the * same ID. */ class AlreadyRegisteredException extends Ice.LocalException { constructor(kindOfObject?: string, id?: string); /** * The kind of object that is registered already: "servant", * "servant locator", "value factory", "plug-in", * "object adapter", "object", or "user exception factory". */ kindOfObject: string; /** * The ID (or name) of the object that is registered already. */ id: string; } /** * An attempt was made to find or deregister something that is not * registered with the Ice run time or Ice locator. * * This exception is raised if an attempt is made to remove a servant, * servant locator, facet, value factory, plug-in, object adapter, * object, or user exception factory that is not currently registered. * * It's also raised if the Ice locator can't find an object or object * adapter when resolving an indirect proxy or when an object adapter * is activated. */ class NotRegisteredException extends Ice.LocalException { constructor(kindOfObject?: string, id?: string); /** * The kind of object that could not be removed: "servant", * "servant locator", "value factory", "plug-in", * "object adapter", "object", or "user exception factory". */ kindOfObject: string; /** * The ID (or name) of the object that could not be removed. */ id: string; } /** * The operation can only be invoked with a twoway request. * * This exception is raised if an attempt is made to invoke an * operation with ice_oneway, ice_batchOneway, ice_datagram, * or ice_batchDatagram and the operation has a return value, * out-parameters, or an exception specification. */ class TwowayOnlyException extends Ice.LocalException { constructor(operation?: string); /** * The name of the operation that was invoked. */ operation: string; } /** * An attempt was made to clone a class that does not support * cloning. * * This exception is raised if ice_clone is called on * a class that is derived from an abstract Slice class (that is, * a class containing operations), and the derived class does not * provide an implementation of the ice_clone operation (C++ only). */ class CloneNotImplementedException extends Ice.LocalException {} /** * This exception is raised if an operation call on a server raises an * unknown exception. For example, for C++, this exception is raised * if the server throws a C++ exception that is not directly or * indirectly derived from Ice::LocalException or * Ice::UserException. */ class UnknownException extends Ice.LocalException { constructor(unknown?: string); /** * This field is set to the textual representation of the unknown * exception if available. */ unknown: string; } /** * This exception is raised if an operation call on a server raises a * local exception. Because local exceptions are not transmitted by * the Ice protocol, the client receives all local exceptions raised * by the server as {@link UnknownLocalException}. The only exception to this * rule are all exceptions derived from {@link RequestFailedException}, * which are transmitted by the Ice protocol even though they are * declared local. */ class UnknownLocalException extends UnknownException {} /** * An operation raised an incorrect user exception. * * This exception is raised if an operation raises a * user exception that is not declared in the exception's * throws clause. Such undeclared exceptions are * not transmitted from the server to the client by the Ice * protocol, but instead the client just gets an * {@link UnknownUserException}. This is necessary in order to not violate * the contract established by an operation's signature: Only local * exceptions and user exceptions declared in the * throws clause can be raised. */ class UnknownUserException extends UnknownException {} /** * This exception is raised if the Ice library version does not match * the version in the Ice header files. */ class VersionMismatchException extends Ice.LocalException {} /** * This exception is raised if the {@link Communicator} has been destroyed. * * @see Communicator#destroy */ class CommunicatorDestroyedException extends Ice.LocalException {} /** * This exception is raised if an attempt is made to use a deactivated * {@link ObjectAdapter}. * * @see ObjectAdapter#deactivate * @see Communicator#shutdown */ class ObjectAdapterDeactivatedException extends Ice.LocalException { constructor(name?: string); /** * Name of the adapter. */ name: string; } /** * This exception is raised if an {@link ObjectAdapter} cannot be activated. * * This happens if the {@link Locator} detects another active {@link ObjectAdapter} with * the same adapter id. */ class ObjectAdapterIdInUseException extends Ice.LocalException { constructor(id?: string); /** * Adapter ID. */ id: string; } /** * This exception is raised if no suitable endpoint is available. */ class NoEndpointException extends Ice.LocalException { constructor(proxy?: string); /** * The stringified proxy for which no suitable endpoint is * available. */ proxy: string; } /** * This exception is raised if there was an error while parsing an * endpoint. */ class EndpointParseException extends Ice.LocalException { constructor(str?: string); /** * Describes the failure and includes the string that could not be parsed. */ str: string; } /** * This exception is raised if there was an error while parsing an * endpoint selection type. */ class EndpointSelectionTypeParseException extends Ice.LocalException { constructor(str?: string); /** * Describes the failure and includes the string that could not be parsed. */ str: string; } /** * This exception is raised if there was an error while parsing a * version. */ class VersionParseException extends Ice.LocalException { constructor(str?: string); /** * Describes the failure and includes the string that could not be parsed. */ str: string; } /** * This exception is raised if there was an error while parsing a * stringified identity. */ class IdentityParseException extends Ice.LocalException { constructor(str?: string); /** * Describes the failure and includes the string that could not be parsed. */ str: string; } /** * This exception is raised if there was an error while parsing a * stringified proxy. */ class ProxyParseException extends Ice.LocalException { constructor(str?: string); /** * Describes the failure and includes the string that could not be parsed. */ str: string; } /** * This exception is raised if an illegal identity is encountered. */ class IllegalIdentityException extends Ice.LocalException { constructor(id?: Identity); /** * The illegal identity. */ id: Identity; } /** * This exception is raised to reject an illegal servant (typically * a null servant) */ class IllegalServantException extends Ice.LocalException { constructor(reason?: string); /** * Describes why this servant is illegal. */ reason: string; } /** * This exception is raised if a request failed. This exception, and * all exceptions derived from {@link RequestFailedException}, are * transmitted by the Ice protocol, even though they are declared * local. */ class RequestFailedException extends Ice.LocalException { constructor(id?: Identity, facet?: string, operation?: string); id: Identity; facet: string; operation: string; } /** * This exception is raised if an object does not exist on the server, * that is, if no facets with the given identity exist. */ class ObjectNotExistException extends RequestFailedException {} /** * This exception is raised if no facet with the given name exists, * but at least one facet with the given identity exists. */ class FacetNotExistException extends RequestFailedException {} /** * This exception is raised if an operation for a given object does * not exist on the server. Typically this is caused by either the * client or the server using an outdated Slice specification. */ class OperationNotExistException extends RequestFailedException {} /** * This exception is raised if a system error occurred in the server * or client process. There are many possible causes for such a system * exception. For details on the cause, {@link SyscallException#error} * should be inspected. */ class SyscallException extends Ice.LocalException { constructor(error?: number); /** * The error number describing the system exception. For C++ and * Unix, this is equivalent to errno. For C++ * and Windows, this is the value returned by * GetLastError() or * WSAGetLastError(). */ error: number; } /** * This exception indicates socket errors. */ class SocketException extends SyscallException {} /** * This exception indicates CFNetwork errors. */ class CFNetworkException extends SocketException { constructor(error?: number, domain?: string); /** * The domain of the error. */ domain: string; } /** * This exception indicates file errors. */ class FileException extends SyscallException { constructor(error?: number, path?: string); path: string; } /** * This exception indicates connection failures. */ class ConnectFailedException extends SocketException {} /** * This exception indicates a connection failure for which * the server host actively refuses a connection. */ class ConnectionRefusedException extends ConnectFailedException {} /** * This exception indicates a lost connection. */ class ConnectionLostException extends SocketException {} /** * This exception indicates a DNS problem. For details on the cause, * {@link DNSException#error} should be inspected. */ class DNSException extends Ice.LocalException { constructor(error?: number, host?: string); /** * The error number describing the DNS problem. For C++ and Unix, * this is equivalent to h_errno. For C++ and * Windows, this is the value returned by * WSAGetLastError(). */ error: number; /** * The host name that could not be resolved. */ host: string; } /** * This exception indicates a request was interrupted. */ class OperationInterruptedException extends Ice.LocalException {} /** * This exception indicates a timeout condition. */ class TimeoutException extends Ice.LocalException {} /** * This exception indicates a connection establishment timeout condition. */ class ConnectTimeoutException extends TimeoutException {} /** * This exception indicates a connection closure timeout condition. */ class CloseTimeoutException extends TimeoutException {} /** * This exception indicates that a connection has been shut down because it has been * idle for some time. */ class ConnectionTimeoutException extends TimeoutException {} /** * This exception indicates that an invocation failed because it timed * out. */ class InvocationTimeoutException extends TimeoutException {} /** * This exception indicates that an asynchronous invocation failed * because it was canceled explicitly by the user. */ class InvocationCanceledException extends Ice.LocalException {} /** * A generic exception base for all kinds of protocol error * conditions. */ class ProtocolException extends Ice.LocalException { constructor(reason?: string); /** * The reason for the failure. */ reason: string; } /** * This exception indicates that a message did not start with the expected * magic number ('I', 'c', 'e', 'P'). */ class BadMagicException extends ProtocolException { constructor(reason?: string, badMagic?: ByteSeq); /** * A sequence containing the first four bytes of the incorrect message. */ badMagic: ByteSeq; } /** * This exception indicates an unsupported protocol version. */ class UnsupportedProtocolException extends ProtocolException { constructor( reason?: string, bad?: ProtocolVersion, supported?: ProtocolVersion, ); /** * The version of the unsupported protocol. */ bad: ProtocolVersion; /** * The version of the protocol that is supported. */ supported: ProtocolVersion; } /** * This exception indicates an unsupported data encoding version. */ class UnsupportedEncodingException extends ProtocolException { constructor( reason?: string, bad?: EncodingVersion, supported?: EncodingVersion, ); /** * The version of the unsupported encoding. */ bad: EncodingVersion; /** * The version of the encoding that is supported. */ supported: EncodingVersion; } /** * This exception indicates that an unknown protocol message has been received. */ class UnknownMessageException extends ProtocolException {} /** * This exception is raised if a message is received over a connection * that is not yet validated. */ class ConnectionNotValidatedException extends ProtocolException {} /** * This exception indicates that a response for an unknown request ID has been * received. */ class UnknownRequestIdException extends ProtocolException {} /** * This exception indicates that an unknown reply status has been received. */ class UnknownReplyStatusException extends ProtocolException {} /** * This exception indicates that the connection has been gracefully shut down by the * server. The operation call that caused this exception has not been * executed by the server. In most cases you will not get this * exception, because the client will automatically retry the * operation call in case the server shut down the connection. However, * if upon retry the server shuts down the connection again, and the * retry limit has been reached, then this exception is propagated to * the application code. */ class CloseConnectionException extends ProtocolException {} /** * This exception is raised by an operation call if the application * closes the connection locally using {@link Connection#close}. * * @see Connection#close */ class ConnectionManuallyClosedException extends Ice.LocalException { constructor(graceful?: boolean); graceful: boolean; } /** * This exception indicates that a message size is less * than the minimum required size. */ class IllegalMessageSizeException extends ProtocolException {} /** * This exception indicates a problem with compressing or uncompressing data. */ class CompressionException extends ProtocolException {} /** * A datagram exceeds the configured size. * * This exception is raised if a datagram exceeds the configured send or receive buffer * size, or exceeds the maximum payload size of a UDP packet (65507 bytes). */ class DatagramLimitException extends ProtocolException {} /** * This exception is raised for errors during marshaling or unmarshaling data. */ class MarshalException extends ProtocolException {} /** * This exception is raised if inconsistent data is received while unmarshaling a proxy. */ class ProxyUnmarshalException extends MarshalException {} /** * This exception is raised if an out-of-bounds condition occurs during unmarshaling. */ class UnmarshalOutOfBoundsException extends MarshalException {} /** * This exception is raised if no suitable value factory was found during * unmarshaling of a Slice class instance. * * @see ValueFactory * @see Communicator#getValueFactoryManager * @see ValueFactoryManager#add * @see ValueFactoryManager#find */ class NoValueFactoryException extends MarshalException { constructor(reason?: string, type?: string); /** * The Slice type ID of the class instance for which no * no factory could be found. */ type: string; } /** * This exception is raised if the type of an unmarshaled Slice class instance does * not match its expected type. * This can happen if client and server are compiled with mismatched Slice * definitions or if a class of the wrong type is passed as a parameter * or return value using dynamic invocation. This exception can also be * raised if IceStorm is used to send Slice class instances and * an operation is subscribed to the wrong topic. */ class UnexpectedObjectException extends MarshalException { constructor(reason?: string, type?: string, expectedType?: string); /** * The Slice type ID of the class instance that was unmarshaled. */ type: string; /** * The Slice type ID that was expected by the receiving operation. */ expectedType: string; } /** * This exception is raised when Ice receives a request or reply * message whose size exceeds the limit specified by the * Ice.MessageSizeMax property. */ class MemoryLimitException extends MarshalException {} /** * This exception is raised when a string conversion to or from UTF-8 * fails during marshaling or unmarshaling. */ class StringConversionException extends MarshalException {} /** * This exception indicates a malformed data encapsulation. */ class EncapsulationException extends MarshalException {} /** * This exception is raised if an unsupported feature is used. The * unsupported feature string contains the name of the unsupported * feature */ class FeatureNotSupportedException extends Ice.LocalException { constructor(unsupportedFeature?: string); /** * The name of the unsupported feature. */ unsupportedFeature: string; } /** * This exception indicates a failure in a security subsystem, * such as the IceSSL plug-in. */ class SecurityException extends Ice.LocalException { constructor(reason?: string); /** * The reason for the failure. */ reason: string; } /** * This exception indicates that an attempt has been made to * change the connection properties of a fixed proxy. */ class FixedProxyException extends Ice.LocalException {} /** * Indicates that the response to a request has already been sent; * re-dispatching such a request is not possible. */ class ResponseSentException extends Ice.LocalException {} } } export {Ice} from './Ice.ns';