mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
Add simple output handling to exception classes
This commit is contained in:
@@ -20,6 +20,8 @@ use StaticPHP\Package\TargetPackage;
|
||||
*/
|
||||
abstract class SPCException extends \Exception
|
||||
{
|
||||
protected bool $simple_output = false;
|
||||
|
||||
/** @var null|array Package information */
|
||||
private ?array $package_info = null;
|
||||
|
||||
@@ -155,6 +157,16 @@ abstract class SPCException extends \Exception
|
||||
return $this->extra_log_files;
|
||||
}
|
||||
|
||||
public function isSimpleOutput(): bool
|
||||
{
|
||||
return $this->simple_output;
|
||||
}
|
||||
|
||||
public function setSimpleOutput(bool $simple_output = true): void
|
||||
{
|
||||
$this->simple_output = $simple_output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load stack trace information to detect Package, Builder, and Installer context.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user