I'm just jump into laravel, this is my first project with.
Now i'm trying to add new exception to handler stack, but for sorry it's not working and i don't know why.
here is my exception class
namespace Lib\Modules\Users\Exceptions;
use Lib\Abstracts\AbstractException;
class ConnotCreateUserException extends AbstractException {
}
Here is my abstract
namespace Lib\Abstracts;
class AbstractException extends \Exception {
}
and here is my error registration inside app/start/global.php
App::error(function(Exception $exception, $code)
{
Log::error($exception);
});
App::error(function(Lib\Modules\Users\Exceptions\ConnotCreateUserException $exception){
return 'Sorry! Something is wrong with this account!';
});
when i throw the exception, i got blank page. but i'm sure it's handled as type of "\Exception" exception.
Thanks in advance