Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4140968
BreakException.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
BreakException.php
View Options
<?php
/*
* This file is part of Psy Shell.
*
* (c) 2012-2023 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Psy\Exception
;
/**
* A break exception, used for halting the Psy Shell.
*/
class
BreakException
extends
\Exception
implements
Exception
{
private
string
$rawMessage
;
/**
* {@inheritdoc}
*/
public
function
__construct
(
$message
=
''
,
$code
=
0
,
?
\Throwable
$previous
=
null
)
{
$this
->
rawMessage
=
$message
;
parent
::
__construct
(
\sprintf
(
'Exit: %s'
,
$message
),
$code
,
$previous
);
}
/**
* Return a raw (unformatted) version of the error message.
*/
public
function
getRawMessage
():
string
{
return
$this
->
rawMessage
;
}
/**
* Throws BreakException.
*
* Since `throw` can not be inserted into arbitrary expressions, it wraps with function call.
*
* @throws BreakException
*/
public
static
function
exitShell
()
{
throw
new
self
(
'Goodbye'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 15:45 (3 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c3/3b/bb66dae83341ba74fa84e2ed9fae
Default Alt Text
BreakException.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment