Skip to content

Instantly share code, notes, and snippets.

@droganov
Created July 22, 2012 21:08
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 droganov/3161052 to your computer and use it in GitHub Desktop.
Save droganov/3161052 to your computer and use it in GitHub Desktop.
public function formapply(struct e){
try {
form.ip = e.t.getIP();
e.t.getBean("item").create(form, "stripHTML");
e.t.abort();
}
catch (any error) {
e.t.getService("log").exception(error);
e.t.setHttpCode(
Val(error.code) ? error.code : 500
);
e.t.rest(error.message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment