Exceptions

Previous Topic

Next Topic

Book Contents

Exceptions

Exceptions are thrown by a method call when the Topics service detects a user error or an internal error.

Topics service methods may throw the following exceptions:

These exceptions contain an errorCode field that categorizes the exception, a message field with a default message that can be displayed to the user, and a detailedMessage field for logging and diagnostics.

You can either display the default message or create a customized message for a particular error code. For example, if there is a missing topic name for a new topic, the customized message could be The new topic name is required instead of the default message You must enter a new topic name.

Send Feedback