Skip to content

Instantly share code, notes, and snippets.

@Archigos
Created July 29, 2014 15:47
Show Gist options
  • Save Archigos/1e196e7f8e98a5c6e6e7 to your computer and use it in GitHub Desktop.
Save Archigos/1e196e7f8e98a5c6e6e7 to your computer and use it in GitHub Desktop.
Simple Error Creation Class
/* Simple Error Class */
class makeErrors {
protected $error;
public function __construct($error) {
$this->error = $error;
}
public function showError($error) {
if($error != NULL) {
throw new Exception($error);
}
}
}
/* Example Usage */
makeErrors::showError("ERROR MESSAGE GOES HERE");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment