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

Logging system and throwing of exceptions instead of quitting. #4158

Closed
dtmoodie opened this issue May 16, 2016 · 2 comments
Closed

Logging system and throwing of exceptions instead of quitting. #4158

dtmoodie opened this issue May 16, 2016 · 2 comments

Comments

@dtmoodie
Copy link

Hi,

Currently caffe quit's whenever a glog check fails. This is undesirable when integrating into C++ applications, because now my whole program can quit for no apparent reason (to the user) when given bad input. Furthermore it can be bad when I've already done a lot of processing in ipython, only to find a spelling error crashes my whole session.
This may just be due to how glog works on window's, but I was under the impression that it's similar on Linux. I propose a shift to throwing exceptions instead.

Furthermore, since boost is already a requirement, why not use boost logging instead of glog?
It shouldn't be terribly difficult to write a set of equivalent macros using boost logging to throw an exception instead.

@lukeyeager
Copy link
Contributor

For context, check out #1683.

@shelhamer
Copy link
Member

I hear the grievances against crashing, but switching to exceptions would require a lot of care and many of the errors can't be recovered from. That said, my stance has been that of #1683 (comment). I'm closing this to keep the conversation at #1683.

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

No branches or pull requests

3 participants