forked from microsoftgraph/msgraph-sdk-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphException.php
More file actions
51 lines (48 loc) · 1.3 KB
/
Copy pathGraphException.php
File metadata and controls
51 lines (48 loc) · 1.3 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* Licensed under the MIT License. See License in the project root
* for license information.
*
* Exceptions File
* PHP version 7
*
* @category Library
* @package Microsoft.Graph
* @copyright 2016 Microsoft Corporation
* @license https://opensource.org/licenses/MIT MIT License
* @version GIT: 0.1.0
* @link https://graph.microsoft.io/
*/
namespace Microsoft\Graph\Exception;
/**
* Class GraphException
*
* @category Library
* @package Microsoft.Graph
* @license https://opensource.org/licenses/MIT MIT License
* @link https://graph.microsoft.io/
*/
class GraphException extends \Exception
{
/**
* Construct a new Graph Exception handler
*
* @param string $message The error to send
* @param int $code The error code associated with the error
* @param \Exception $previous The last error sent, defaults to null
*/
public function __construct($message, $code = 0, $previous = null)
{
parent::__construct($message, $code, $previous);
}
/**
* Stringify the returned error and message
*
* @return string The returned string message
*/
public function __toString()
{
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
}
}