Skip to content

Better handling of RuntimeExceptions in ObjectGraphWalker #46

@roytruelove

Description

@roytruelove

(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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions