Skip to content

Instantly share code, notes, and snippets.

@vikaskanani
Created March 7, 2024 06:08
Show Gist options
  • Save vikaskanani/a5f92dee6558ce903b452f63d37c28fd to your computer and use it in GitHub Desktop.
Save vikaskanani/a5f92dee6558ce903b452f63d37c28fd to your computer and use it in GitHub Desktop.
Custom throw in cfml
<cfscript>
try {
throw(
message="MyError",
errorcode="100",
detail="Error Detail"
);
} catch (any e) {
writeOutput("Caught Exception: " & e.message & " with errror code: " & e.errorcode & " and detail: " & e.detail);
}
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment