Exceptions. EMS 2008 SQL Manager for InterBase/Firebird
Reklama
Reklama
229 SQL Manager 2008 for InterBase/Firebird User's Manual
5.9
Exceptions
Exceptions are user-defined errors and messages to use in stored procedures and triggers.
When raised by a trigger or a stored procedure, the exception: terminates the trigger or procedure in which it was raised and undoes any actions performed (directly or indirectly) by it; returns an error message to the calling application.
Exceptions may be trapped and handled with a WHEN statement in a stored procedure or trigger.
Create exception
To create a new exception:
·
Select the Database | New Object... menu item.
·
Select Exception in the
dialog.
·
Edit exception definition within the
.
Hint: To create new exception you can also right-click the exceptions node of the explorer tree and select the New Exception... item from the popup menu.
To create a new exception with the same properties as one of the existing exceptions has:
·
Select the Database | Duplicate Object... menu item.
·
Follow the instructions of the
.
Edit exception
To edit the existing exception:
·
Select the exception for editing in the explorer tree (type the first letters of the exception name for quick search).
·
Right-click and select the Edit Exception <Exception_Name> item from the popup menu or simply double-click the exception.
·
Edit exception definition and data on the appropriate tabs of the
.
To change the name of the exception:
·
Select the exception to rename in the explorer tree.
·
Right-click and select the Rename Exception <Exception_Name> item from the popup menu.
·
Edit exception name in the dialog window.
Drop exception
To drop a exception:
·
Select the exception to drop in the explorer tree.
© 2008 EMS Database Management Solutions
230 SQL Manager 2008 for InterBase/Firebird User's Manual
·
Right-click and select the Drop Exception <Exception_Name> item from the popup menu.
·
Confirm dropping in the dialog window.
5.9.1
Exception Editor
The Exception Editor allows you to define exception properties. It opens when you create a new sequence or edit the existing one (see
Create Exception and Edit Exception
for details).
To open a view in the Exception Editor, double-click it in the
·
·
·
© 2008 EMS Database Management Solutions
231 SQL Manager 2008 for InterBase/Firebird User's Manual
·
·
Availability:
Windows Professional
Windows Lite
5.9.1.1
Using navigation bar
The navigation bar on the left allows you to:
Yes
Yes
Object bar:
·
Select a database and a exception for editing within the current window.
General bar:
·
Compile the current exception definition
·
Print metadata of the current exception
·
View
for the exception
·
Perform
·
Refresh the content of the active tab
·
Bring the window to its default size
The next bar displays various actions according to the current page of Exception Editor.
© 2008 EMS Database Management Solutions
232 SQL Manager 2008 for InterBase/Firebird User's Manual
5.9.1.2
Editing exception definition
The basic exception parameters are set on the Exception tab.
Name
Name of the exception; it must be unique to the database.
Text
Text of the message, displayed when exception is raised. Maximum string length is 78 characters.
See also:
© 2008 EMS Database Management Solutions
233 SQL Manager 2008 for InterBase/Firebird User's Manual
© 2008 EMS Database Management Solutions
Atsisiųsti
Reklama