Skip to content

Commit 5a776dc

Browse files
committed
Improve error reporting to print config value failing validation. #60
1 parent 1f77c33 commit 5a776dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/classes/class.phpipamAgent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public function set_scan_type ($type) {
296296
public function set_ping_type () {
297297
//validate
298298
if (!in_array($this->config->method, $this->ping_types)) {
299-
$this->Result->throw_exception (500, "Invalid ping type - $this->ping_type!");
299+
$this->Result->throw_exception (500, "Invalid ping method - \$config['method'] = \"".escape_input($this->config->method)."\"");
300300
}
301301
// ok, save
302302
$this->ping_type = $this->config->method;
@@ -357,7 +357,7 @@ private function validate_threading () {
357357
*/
358358
private function validate_ping_path () {
359359
if(!file_exists($this->config->pingpath)) {
360-
$this->Result->throw_exception (500, "Invalid ping path!");
360+
$this->Result->throw_exception (500, "ping executable does not exist - \$config['pingpath'] = \"".escape_input($this->config->pingpath)."\"");
361361
}
362362
}
363363

0 commit comments

Comments
 (0)