mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
* add type-checking plugin for flakeheaven * update lock file * fix type-checking issues in current codebase * run linters
20 lines
471 B
Python
20 lines
471 B
Python
# Copyright © 2012-2022 jrnl contributors
|
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from jrnl.output import print_msg
|
|
|
|
if TYPE_CHECKING:
|
|
from jrnl.messages import Message
|
|
|
|
|
|
class JrnlException(Exception):
|
|
"""Common exceptions raised by jrnl."""
|
|
|
|
def __init__(self, *messages: "Message"):
|
|
self.messages = messages
|
|
|
|
def print(self) -> None:
|
|
for msg in self.messages:
|
|
print_msg(msg)
|