/**
  * Encodes given exception to corresponding output
  * @return Output Encoded output
  */
 public function output()
 {
     $msg = array("message" => $this->message);
     if ($this->code > 0) {
         $msg["code"] = $this->code;
     }
     if (ENVIRONMENT === "dev") {
         $msg['file'] = $this->file;
         $msg['line'] = $this->line;
     }
     return Output::encode($msg, Server::output());
 }
 /**
  * Retrieves information about given endpoint request
  * @return mixed 	Endpoint information
  */
 public function endpoint_request()
 {
     if (ENVIRONMENT !== "dev") {
         return NULL;
     }
     return Output::encode($this->server->get(), $this->server->output);
 }