Skip to content

Journal error_channel raises errors, which mask subsequent raised errors #129

@scottstanie

Description

@scottstanie

Right now we have a number of places that do something like

msg = "Some error message"
error_channel.log(msg)
raise ValueError(msg)

but that way journal is set up, anything logged to the error channel or higher (the fatal channel) will raise it's own python error:

( in testjournal.py)

import journal
error_channel = journal.error('test')
error_channel.log("This is a test error message")
raise ValueError("This will never be raised")
$ python testjournal.py
journal: This is a test error message
Traceback (most recent call last):
  File "/Users/staniewi/repos/testjournal.py", line 3, in <module>
    error_channel.log("This is a test error message")
journal.ext.journal.ApplicationError: test: application error

I think we have two options

  1. simply remove the raise .... statements after all our logging with journal to the error channel
  2. if we want the specific python error (like ValueError, OSError, PermisionsError) to be raised, we'll need to change which channel we're logging two

I only bring up 2 as an option because the error raised will always be a journal.ext.journal.ApplicationError

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions