Exception handling and important exceptions

Every unexpected case, from an IO communication problem with RedDot CMS until a request to a page element that does not exist will be thrown as an Exception.

jRQL generally throw a RQLException which contain a explanation text I have written and optional an embedded more specialized excption, e.g. in the case of an IO error. You have to handle this exception in your code every time.

In addition to this general exception there are 35 more specialized sub classes of RQLException covering special problems in your code, often from a logical point of view.

Let me introduce the ElementNotFoundException – it will be thrown if you access a page element which cannot be found in the underlaying content class.

Or the WrongTypeException if you use a method like currentPage. getContainer(“element name”), but the element in the underlaying content class is a list and not a container.

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: