mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-04-13 12:58:38 +02:00
Summary: Ref T13395. Moves all remaining code in "libphutil/" into "arcanist/". Test Plan: Ran various arc workflows, although this probably has some remaining rough edges. Maniphest Tasks: T13395 Differential Revision: https://secure.phabricator.com/D20980
30 lines
622 B
PHP
30 lines
622 B
PHP
<?php
|
|
|
|
final class PhutilInvalidStateException extends Exception {
|
|
private $callee;
|
|
private $function;
|
|
|
|
public function __construct($function, $callee = null) {
|
|
if ($callee === null) {
|
|
$callee = idx(debug_backtrace(), 1);
|
|
$callee = idx($callee, 'function');
|
|
}
|
|
|
|
$this->callee = $callee;
|
|
$this->function = $function;
|
|
|
|
parent::__construct(
|
|
pht(
|
|
'Call %s before calling %s!',
|
|
$this->function.'()',
|
|
$this->callee.'()'));
|
|
}
|
|
|
|
public function getCallee() {
|
|
return $this->callee;
|
|
}
|
|
|
|
public function getFunction() {
|
|
return $this->function;
|
|
}
|
|
}
|