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

Better handling of RuntimeExceptions in ObjectGraphWalker #46

Open
roytruelove opened this issue Jun 23, 2016 · 0 comments
Open

Better handling of RuntimeExceptions in ObjectGraphWalker #46

roytruelove opened this issue Jun 23, 2016 · 0 comments

Comments

@roytruelove
Copy link

(on version 0.2.0, using ehcache version 3.0.2)

I was getting the following WARN-level logs when attempting to cache a certain object:

Max Object Graph Size reached for the object

thrown from here.

In order to determine why I was getting this, I set the traversalDebugMessage to true (using the log levels and the system property) and I can see in a debugger that it's being appended to as it's being walked.

The issue is, if anything in the walk method throws a RuntimeException, the code that ultimately provides the message to the logger is never called.

This code should be wrapped in a finally clause to log the traversalDebugMessage. Without those logs it's difficult to debug errors like the one given above.

Thank you!

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

1 participant