| Contents > Developing ColdFusion MX Applications > Integrating J2EE and Java Elements in CFML Applications > Using Java objects > Handling Java exceptions |
|
|
|
|
||
You handle Java exceptions just as you handle standard ColdFusion exceptions, with the cftry and cfcatch tags. You specify the name of the exception class in the cfcatch tag that handles the exception. For example, if a Java object throws an exception named myException, you specify myException in the cfcatch tag.
Note: To catch any exception generated by a Java object, specify java.lang.Exception for the cfcatch type attribute. To catch any Throwable errors, specify java.lang.Throwable in the cfcatch tag type attribute.
The following sections show an example of throwing and handling a Java exception.
For more information on exception handling in ColdFusion MX, see Handling Errors.
|
|
||
| Contents > Developing ColdFusion MX Applications > Integrating J2EE and Java Elements in CFML Applications > Using Java objects > Handling Java exceptions |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.