Skip to content

elarm functions could return whether the alarm already existed #9

Description

@hcs42

We had an idea with Richard that elarm:raise and elarm:clear could return whether they raised/cleared an alarm or did nothing because the alarm was already existing/non-existing.

This way we could write code like this, which logs the problems only once:

case elarm:raise(...) of
    ok ->
        lager:error(...);
    existing ->
        ok
end.

@nygge, what do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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