eight04 / angular-datetime

A directive to add the behavior of datetime input on unsupported browsers.
MIT License
93 stars 28 forks source link

How to handle errors? #30

Closed kino90 closed 7 years ago

kino90 commented 8 years ago

Hi! Nice project! Is there a way to correctly handle the errors thrown by the plugin avoiding the output on the console? How to do it?

Thanks

eight04 commented 8 years ago

Do you mean the error logged by the directive? https://github.com/eight04/angular-datetime/blob/master/src/directive.js#L294

It use $log service to log error. There is no official API to disable $log.error so you may have to make a decorator to control it.

But why do you want to disable the log? Is it better to disable it by the default?

janwirth commented 8 years ago

@kino90 did you find a solution?

kino90 commented 8 years ago

@FranzSkuffka sadly we're not looking for that at the moment.. The project needs to go live soon, so we'll consider this minor issues in the future :) i'll let you know as soon as I'll look into it :)

mackski commented 8 years ago

Why not change this to log.debug? Then in production, console is clean.

eight04 commented 7 years ago

The logging is removed at v5.0.0.