Unify error and message outputs #46

Closed
opened 2021-05-14 15:34:00 +02:00 by FWDekker · 0 comments
Owner

The ErrorHandler and MessageHandler classes are really similar, and could benefit from being unified into the same class to reduce code duplication. (maybe?)

The unified handler has a special type of message which is "persistent" in the sense that it can be overwritten by another message; this is the feature of the MessageHandler. On the other hand, the ErrorHandler's feature is that each message is added separately, but always above the persistent messages.

Maybe this will actually make the code way more complex, in which case this should not be implemented. But maybe not, so let's see.

The `ErrorHandler` and `MessageHandler` classes are really similar, and could benefit from being unified into the same class to reduce code duplication. (maybe?) The unified handler has a special type of message which is "persistent" in the sense that it can be overwritten by another message; this is the feature of the `MessageHandler`. On the other hand, the `ErrorHandler`'s feature is that each message is added separately, but always above the persistent messages. Maybe this will actually make the code way more complex, in which case this should not be implemented. But maybe not, so let's see.
FWDekker added the
code-quality
label 2021-05-14 15:34:00 +02:00
FWDekker self-assigned this 2021-05-14 15:34:00 +02:00
FWDekker referenced this issue from a commit 2022-11-22 20:28:33 +01:00
Sign in to join this conversation.
No description provided.