Mercurial > libervia-backend
comparison src/core/exceptions.py @ 2132:c0577837680a
core: replaced SkipHistory exception by a key in mess_data:
SkipHistory was skipping all remaining triggers just to skip history, which is not the intented behaviour.
Now history can be skipped by setting mess_data[u'history'] = C.HISTORY_SKIP, this way we won't skip importants triggers.
When history is skipped, mess_data[u'extra'][u'history'] will be set to C.HISTORY_SKIP for frontends, so they can inform user that the message is not stored locally.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 05 Feb 2017 14:55:21 +0100 |
parents | 200cd707a46d |
children | 537a4a8075f8 |
comparison
equal
deleted
inserted
replaced
2131:628c1c95f442 | 2132:c0577837680a |
---|---|
106 | 106 |
107 class PermissionError(Exception): | 107 class PermissionError(Exception): |
108 pass | 108 pass |
109 | 109 |
110 | 110 |
111 class SkipHistory(Exception): # used in MessageReceivedTrigger to avoid history writting | |
112 pass | |
113 | |
114 | |
115 class ParsingError(Exception): | 111 class ParsingError(Exception): |
116 pass | 112 pass |
117 | 113 |
118 | 114 |
119 # Something which need to be done is not available yet | 115 # Something which need to be done is not available yet |