Skip to content

Logging an error causes a NullPointerException #67

@jorgelamb

Description

@jorgelamb

Hi,

We are having some issue in our project using squirrel framework. For some unknown reason we are still trying to find and after working fine for several hours the mvel condition fails, but then in the catch block it tries to log the exceptions .getCause().getMessage() and that causes a NullPointerException.

Some exceptions might have the getCause() as null, so it would be safer to check for null before logging it.

The affected line:

logger.error("Evaluate \""+mvelExpression+"\" failed, which caused by "+e.getCause().getMessage());

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions