Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call to $this->failed() does not work in the command structure #32

Closed
kruisdraad opened this issue Jul 25, 2015 · 1 comment
Closed

Comments

@kruisdraad
Copy link
Member

In a failed attempt to parse events, the call to $this->failed() does not work in the command structure:

[2015-07-24 22:10:05] local.ERROR: exception 'ErrorException' with message 'call_user_func() expects parameter 1 to be a valid callback, cannot access protected method AbuseIO\Commands\EmailProcess::failed()' in /opt/abuseio/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:77
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'call_user_func(...', '/opt/abuseio/ve...', 77, Array)
#1 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(77): call_user_func(Array, Object(AbuseIO\Commands\EmailProcess))
#2 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(206): Illuminate\Queue\CallQueuedHandler->failed(Array)
#3 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(243): Illuminate\Queue\Jobs\Job->failed()
#4 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(201): Illuminate\Queue\Worker->logFailedJob('beanstalkd', Object(Illuminate\Queue\Jobs\BeanstalkdJob))
#5 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(159): Illuminate\Queue\Worker->process('beanstalkd', Object(Illuminate\Queue\Jobs\BeanstalkdJob), '1', '0')
#6 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(109): Illuminate\Queue\Worker->pop(NULL, 'emails', '0', '3', '1')
#7 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(71): Illuminate\Queue\Console\WorkCommand->runWorker(NULL, 'emails', '0', '128', false)
#8 [internal function]: Illuminate\Queue\Console\WorkCommand->fire()
#9 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Container/Container.php(502): call_user_func_array(Array, Array)
#10 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Console/Command.php(149): Illuminate\Container\Container->call(Array)
#11 /opt/abuseio/vendor/symfony/console/Command/Command.php(259): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Console/Command.php(135): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /opt/abuseio/vendor/symfony/console/Application.php(878): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /opt/abuseio/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /opt/abuseio/vendor/symfony/console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /opt/abuseio/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(100): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /opt/abuseio/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 {main}

@kruisdraad kruisdraad added the bug label Jul 25, 2015
@kruisdraad kruisdraad added this to the 4.0.0 milestone Jul 25, 2015
@kruisdraad
Copy link
Member Author

resolved by fixing coding error. This->exception was called twice before there was no return in the calling object. Using return $this->exception works in main and debug modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant