Skip to content

Instantly share code, notes, and snippets.

@atuttle
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atuttle/b97a544498f425b528ca to your computer and use it in GitHub Desktop.
Save atuttle/b97a544498f425b528ca to your computer and use it in GitHub Desktop.
This file demonstrates that ACF (Tested on latest patched CF10) does allow for "partial matching" of custom-typed thrown exceptions.
<cfscript>
try {
throw(type="com.myService.BarException");
} catch(com.myService.FooException e){
writeOutput("caught it @ com.myService.FooException");
} catch(com.myService e){
writeOutput("caught it @ com.myService");
} catch(com e){
writeOutput("caught it @ com");
} catch (any e){
writeOutput("caught it @ any");
}
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment