Merge pull request #335 from daylerees/develop
Show an error when an artisan task's method cannot be found.
This commit is contained in:
commit
53a20533f1
|
@ -42,7 +42,14 @@ public static function run($arguments = array())
|
||||||
throw new \Exception("Sorry, I can't find that task.");
|
throw new \Exception("Sorry, I can't find that task.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$task->$method(array_slice($arguments, 1));
|
if(method_exists($task, $method))
|
||||||
|
{
|
||||||
|
$task->$method(array_slice($arguments, 1));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new \Exception("Sorry, I can't find that method!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -186,4 +193,4 @@ protected static function format($bundle, $task)
|
||||||
return '\\'.$prefix.Str::classify($task).'_Task';
|
return '\\'.$prefix.Str::classify($task).'_Task';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue