view = PATH::VIEW . "error.php"; $this->title = "Error - SWDB"; if (null == $code || intval($code) < 200 || intval($code) > 599){ $code = 500; } switch(intval($code)){ case 400: $this->description = "Invalid request"; break; case 404: $this->description = "Not found"; break; case 500: $this->description = "Server error"; break; default: $this->description = "Unknown error"; } $this->code = intval($code); } } ?>