Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97273517
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, Jan 3, 23:14
Size
925 B
Mime Type
text/x-php
Expires
Sun, Jan 5, 23:14 (2 d)
Engine
blob
Format
Raw Data
Handle
23371254
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