1
と例外のために私は私がJSOMでカスタムエラーハンドラを設定している戻りJSONはoctoberCMS
private function getPath()
{
$path = Input::get('path');
if (!$path)
{
throw new MyException('parameter is missing. path required', 400);
}
return base_path().'/'.$path;
}
パスを検証するための機能を持っているいくつかのカスタムルートをどこか私のクラスで
Route::get('/files/', [
'as' => 'read',
'uses' => 'Myname\MyPlugin\Http\Controllers\[email protected]'
]);
を持っていますエラーをHTML形式で表示するのはOctoberCMSのエラーハンドラです。
OctoberCMSのデフォルトエラーハンドラをカスタムカスタムハンドラに置き換える方法をご存知ですか?あなたのプラグインに例外を管理するために、エラー:https://octobercms.com/docs/services/error-log#exception-handling
10月アプリケーションを提供します。 おかげ