Last active
August 29, 2015 14:05
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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