You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/Application/UI/Form.php
+1-1
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ public function signalReceived($signal)
143
143
}
144
144
} else {
145
145
$class = get_class($this);
146
-
thrownewBadSignalException("Missing handler for signal '$signal' in $class.");
146
+
thrownewNette\Application\RejectedRequestException("Missing handler for signal '$signal' in $class.", Nette\Application\RejectedRequestException::FAILED_SIGNAL);
thrownewBadSignalException("The signal receiver component '$this->signalReceiver' is not ISignalReceiver implementor.");
326
+
thrownewRejectedRequestException("The signal receiver component '$this->signalReceiver' is not ISignalReceiver implementor.", RejectedRequestException::FAILED_SIGNAL);
326
327
}
327
328
328
329
$component->signalReceived($this->signal);
@@ -393,7 +394,7 @@ public function changeAction($action)
393
394
$this->view = $action;
394
395
395
396
} else {
396
-
$this->error('Action name is not alphanumeric string.');
397
+
thrownewRejectedRequestException('Action name is not alphanumeric string.', RejectedRequestException::FAILED_ARGUMENT);
397
398
}
398
399
}
399
400
@@ -444,7 +445,7 @@ public function setLayout($layout)
444
445
445
446
/**
446
447
* @return void
447
-
* @throws Nette\Application\BadRequestException if no template found
448
+
* @throws RejectedRequestException if no template found
448
449
* @throws Nette\Application\AbortException
449
450
*/
450
451
publicfunctionsendTemplate()
@@ -1215,7 +1216,7 @@ protected function saveGlobalState()
1215
1216
/**
1216
1217
* Initializes $this->globalParams, $this->signal & $this->signalReceiver, $this->action, $this->view. Called by run().
1217
1218
* @return void
1218
-
* @throws Nette\Application\BadRequestException if action name is not valid
1219
+
* @throws RejectedRequestException if action name is not valid
1219
1220
*/
1220
1221
privatefunctioninitGlobalParameters()
1221
1222
{
@@ -1251,7 +1252,7 @@ private function initGlobalParameters()
1251
1252
if (isset($selfParams[self::SIGNAL_KEY])) {
1252
1253
$param = $selfParams[self::SIGNAL_KEY];
1253
1254
if (!is_string($param)) {
1254
-
$this->error('Signal name is not string.');
1255
+
thrownewRejectedRequestException('Signal name is not string.', RejectedRequestException::FAILED_ARGUMENT);
0 commit comments