Kdyby / Console

Symfony Console integration for Kdyby components
https://packagist.org/packages/kdyby/console
Other
52 stars 54 forks source link

Handle (don't log) exception on unknown command/argument #15

Closed mishak87 closed 9 years ago

mishak87 commented 10 years ago
> bin o:su --force
There are no commands defined in the "o:su" namespace.

  Did you mean one of these?
      orm:generate
      orm:clear-cache
      orm
      orm:schema-tool

  (Tracy output was stored in exception-2014-05-13-07-58-20-2d1c81e8f09cc64beeb6389404440c66.html)

Should show only the message and return code for unknown command. IMO Tracy is not supposed to log error produced by use mistake.

mishak87 commented 10 years ago

Maybe option logNoCommandsDefinedException disabled by default for people that want to log such mistakes as errors.

fprochazka commented 10 years ago

I agree, do you wanna implement this logic? (I wouldn't bother with switch, nobody should need to log them). Maybe just save error string from exception message to error log?

fprochazka commented 9 years ago

I believe this has been already implement, but we've forgotten to close this issue. https://github.com/Kdyby/Console/commit/77a8285aa42f5c6555cf2ed3bb116a10f243ab88

snimek obrazovky porizeny 2015-06-14 18 07 35