Skip to main content

Exception Types

The following table details each of the exception types thrown by AMPS.

ExceptionWhenNotes
AlreadyConnectedExceptionConnectingThrown when connect() is called on a Client that is already connected.
AMPSExceptionAnytimeBase class for all AMPS exceptions.
AuthenticationExceptionAnytimeIndicates that an authentication failure occurred on the server.
BadFilterExceptionSubscribingThis typically indicates a syntax error in a filter expression.
BadRegexTopicExceptionSubscribingIndicates that a malformed regular expression was found in the topic name.
CommandExceptionAnytimeBase class for all exceptions relating to commands sent to AMPS.
ConnectionExceptionAnytimeBase class for all exceptions relating to the state of the AMPS connection.
ConnectionRefusedExceptionConnectingThe connection was actively refused by the server. Validate that the server is running, that network connectivity is available, and the settings on the client match those on the server.
DisconnectedExceptionAnytimeNo connection is available when AMPS needed to send data to the server or the user's disconnect handler threw an exception.
InvalidTopicExceptionSubscribe or QueryThe topic is not configured for the requested operation. For example, a sow command was issued for a topic that is not in the SOW or a bookmark subscribe was issued for a topic that is not recorded in the transaction log.
InvalidTransportOptionsExceptionConnectingAn invalid option or option value was specified in the URI.
InvalidURIExceptionConnectingThe URI string provided to connect() was formatted improperly.
MessageTypeExceptionConnectingThe class for a given transport's message type was not found in AMPS.
MessageTypeNotFoundExceptionConnectingThe message type specified in the URI was not found in AMPS.
NameInUseExceptionConnectingThe client name (specified when instantiating Client) is already in use on the server.
NotEntitledExceptionConnecting SubscribingThe user does not have permission for the requested command (logging on or subscribing).
RetryOperationExceptionAnytimeAn error occurred that caused processing of the last command to be aborted. Try issuing the command again.
StreamExceptionAnytimeIndicates that data corruption has occurred on the connection between the client and server. This usually indicates an internal error inside of AMPS—please contact AMPS support.
SubscriptionAlreadyExistsExceptionSubscribingA subscription has been requested using the same CommandId as another subscription. Create a unique CommandId for every subscription.
TimedOutExceptionAnytimeA timeout occurred waiting for a response to a command.
TransportTypeExceptionConnectingThrown when a transport type, unknown to AMPS is selected in the URI.
UnknownExceptionAnytimeThrown when an internal error occurs. Contact AMPS support immediately.