Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106037751
PhabricatorApplicationTransactionValidationException.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Mar 21, 18:17
Size
930 B
Mime Type
text/x-php
Expires
Sun, Mar 23, 18:17 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25006346
Attached To
rPH Phabricator
PhabricatorApplicationTransactionValidationException.php
View Options
<?php
final
class
PhabricatorApplicationTransactionValidationException
extends
Exception
{
private
$errors
;
public
function
__construct
(
array
$errors
)
{
assert_instances_of
(
$errors
,
'PhabricatorApplicationTransactionValidationError'
);
$this
->
errors
=
$errors
;
$message
=
array
();
$message
[]
=
pht
(
'Validation errors:'
);
foreach
(
$this
->
errors
as
$error
)
{
$message
[]
=
' - '
.
$error
->
getMessage
();
}
parent
::
__construct
(
implode
(
"
\n
"
,
$message
));
}
public
function
getErrors
()
{
return
$this
->
errors
;
}
public
function
getErrorMessages
()
{
return
mpull
(
$this
->
errors
,
'getMessage'
);
}
public
function
getShortMessage
(
$type
)
{
foreach
(
$this
->
errors
as
$error
)
{
if
(
$error
->
getType
()
===
$type
)
{
if
(
$error
->
getShortMessage
()
!==
null
)
{
return
$error
->
getShortMessage
();
}
}
}
return
null
;
}
}
Event Timeline
Log In to Comment