Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105864101
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
Thu, Mar 20, 09:15
Size
925 B
Mime Type
text/x-php
Expires
Sat, Mar 22, 09:15 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25049786
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
[]
=
'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