Skip to content

Commit

Permalink
update file Axm.php
Browse files Browse the repository at this point in the history
  • Loading branch information
juancristobalgd1 authored Dec 1, 2023
1 parent d5d0da0 commit c254c79
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Axm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

declare(strict_types=1);

use Exception;
use Axm\Application;
use Axm\Exception\AxmException;
use Axm\Exception\AxmCLIException;

/**
Expand Down Expand Up @@ -72,8 +72,9 @@ protected static function initSystemHandlers()
});
}

if (self::$_environment !== 'production')
if (self::$_environment !== 'production'){
\Axm\HandlerErrors::make(new \Whoops\Handler\PrettyPageHandler, new \Whoops\Run);
}
}

/**
Expand Down Expand Up @@ -243,12 +244,12 @@ public static function getPerformanceStats(): array
* will cause an exception to be thrown.
* To retrieve the application instance, use app().
* @param Application $app The application instance.
* @throws AxmException if multiple application instances are registered.
* @throws Exception if multiple application instances are registered.
*/
public static function setApplication(Application $app): void
{
if (self::$_app !== null) {
throw new AxmException('Axm application can only be created once.');
throw new Exception('Axm application can only be created once.');
}

self::$_app = $app;
Expand Down

0 comments on commit c254c79

Please sign in to comment.