mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-25 23:55:56 +03:00
[GH-ISSUE #12] improve error reporting for inexisting handler type #2
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dbu on GitHub (Apr 12, 2011).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/12
when i set the handler for a logger to a not existing one, i get a fatal exception that is confusing. the best would be an exception along "Did not find the handler you specified: $type. Available handlers are: ... . If you are adding your own handler, define the property monolog.handler.XXX.class."
PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'The parameter "monolog.handler.fingers_crossed_whatever.class" must be defined.' in /home/david/tmp/cmf-sandbox/vendor/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:77
Stack trace:
#0 /home/david/tmp/cmf-sandbox/vendor/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(141): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->get('monolog.handler...')
#1 /home/david/tmp/cmf-sandbox/vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php(99): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->resolveValue('%monolog.handle...')
#2 /home/david/tmp/cmf-sandbox/vendor/symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php(83): Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass->resolveString('%monolog.handle...')
#3 /home/david/tmp/cmf-sandbox/vendor/s in /home/david/tmp/cmf-sandbox/vendor/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php on line 77
@Seldaek commented on GitHub (Apr 12, 2011):
This is actually a Symfony issue in MonologBundle, but I'll keep this open here until it's fixed.
@dbu commented on GitHub (Apr 12, 2011):
ups, sorry, of course. still not totally wrapped my brain around the implications of clear separation. (although it is very well done :-)