Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92652955
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, Nov 22, 10:12
Size
930 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 10:12 (2 d)
Engine
blob
Format
Raw Data
Handle
22479317
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