FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sentry-php/src/ExceptionDataBag.php at source-frame-cache · getsentry/sentry-php · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
getsentry
/
sentry-php
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
475
Star
1.9k
Code
Issues
20
Pull requests
11
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
sentry-php
/
src
/
ExceptionDataBag.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
120 lines (101 loc) · 2.71 KB
Breadcrumbs
sentry-php
/
src
/
ExceptionDataBag.php
Copy path
File metadata and controls
120 lines (101 loc) · 2.71 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
declare
(strict_types=
1
);
namespace
Sentry
;
/**
* This class represents the Exception Interface and contains the details of an
* exception or error that occurred in the program.
*
* @author Stefano Arlandini <sarlandini@alice.it>
*/
final
class
ExceptionDataBag
{
/**
* @var string The type of exception, e.g. RuntimeException
*/
private
$
type
;
/**
* @var string The value of the exception
*/
private
$
value
;
/**
* @var Stacktrace|null An optional stack trace object corresponding to the Stack Trace Interface
*/
private
$
stacktrace
;
/**
* @var ExceptionMechanism|null An optional object describing the mechanism that created this exception
*/
private
$
mechanism
;
public
function
__construct
(
\
Throwable
$
exception
, ?
Stacktrace
$
stacktrace
=
null
, ?
ExceptionMechanism
$
mechanism
=
null
)
{
$
this
->
type
=
\get_class
(
$
exception
);
$
this
->
value
=
$
exception
->
getMessage
();
$
this
->
stacktrace
=
$
stacktrace
;
$
this
->
mechanism
=
$
mechanism
;
}
/**
* Gets the type of exception, e.g. RuntimeException.
*/
public
function
getType
():
string
{
return
$
this
->
type
;
}
/**
* Sets the type of the exception.
*
* @param string $type The exception type
*/
public
function
setType
(
string
$
type
):
self
{
$
this
->
type
=
$
type
;
return
$
this
;
}
/**
* Gets the value of the exception.
*/
public
function
getValue
():
string
{
return
$
this
->
value
;
}
/**
* Sets the value of the exception.
*/
public
function
setValue
(
string
$
value
):
self
{
$
this
->
value
=
$
value
;
return
$
this
;
}
/**
* Gets the stack trace object corresponding to the Stack Trace Interface.
*/
public
function
getStacktrace
(): ?
Stacktrace
{
return
$
this
->
stacktrace
;
}
/**
* Sets the stack trace object corresponding to the Stack Trace Interface.
*
* @param Stacktrace $stacktrace The stacktrace
*/
public
function
setStacktrace
(
Stacktrace
$
stacktrace
):
self
{
$
this
->
stacktrace
=
$
stacktrace
;
return
$
this
;
}
/**
* Gets the object describing the mechanism that created this exception.
*/
public
function
getMechanism
(): ?
ExceptionMechanism
{
return
$
this
->
mechanism
;
}
/**
* Sets the object describing the mechanism that created this exception.
*
* @param ExceptionMechanism|null $mechanism The mechanism that created this exception
*/
public
function
setMechanism
(?
ExceptionMechanism
$
mechanism
):
self
{
$
this
->
mechanism
=
$
mechanism
;
return
$
this
;
}
}
Back
|
FazBrowse Home
|
New Git URL