Add console rendering for nami exception
This commit is contained in:
parent
ff82886738
commit
423fb27f51
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Zoomyboy\LaravelNami;
|
namespace Zoomyboy\LaravelNami;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
|
@ -48,4 +49,11 @@ class NamiException extends \Exception {
|
||||||
|
|
||||||
throw ValidationException::withMessages(['id' => 'Unbekannter Fehler']);
|
throw ValidationException::withMessages(['id' => 'Unbekannter Fehler']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function outputToConsole(Command $command): void
|
||||||
|
{
|
||||||
|
$command->info("Request URL: ".$this->requestUrl);
|
||||||
|
$command->info("response: ".json_encode($this->response));
|
||||||
|
$command->info($this->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue