File: class.exception.php

package info (click to toggle)
kopano-webapp-plugin-files 2.1.5%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,540 kB
  • sloc: php: 15,863; xml: 494; java: 295; python: 72; sh: 44; makefile: 11
file content (33 lines) | stat: -rw-r--r-- 581 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
 * A custom exception class for webdav exceptions
 *
 * @class   BackendException
 * @extends Exception
 */

namespace Files\Backend;

class Exception extends \Exception
{
	/**
	 * @constructor
	 *
	 * @param string $message The error message
	 * @param int $code The error code
	 */
	public function __construct($message, $code = 0)
	{
		parent::__construct($message, $code);
	}

	/**
	 * Overrides the toString method.
	 *
	 * @return string Error code and message
	 */
	public function __toString()
	{
		return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
	}
}