Commit 0933e122 authored by Valentin Valls's avatar Valentin Valls

Fix problem with message system

parent 36c53370
......@@ -33,6 +33,7 @@ from typing import Optional
import numpy
import enum
import logging
import contextlib
from silx.gui import qt
......@@ -41,6 +42,9 @@ from .style_model import Style
from . import style_model
_logger = logging.getLogger(__name__)
class ChangeEventType(enum.Enum):
"""Enumerate the list of attributes which can emit a change event."""
......@@ -449,7 +453,17 @@ class ComputableMixIn:
try:
result = self.compute(scan)
except ComputeError as e:
try:
# FIXME: This messages should be stored at the same place
scan.setCacheValidation(self, self.version(), e.msg)
except KeyError:
_logger.error(
"Computation message lost: %s, %s, %s",
self,
self.version(),
e.msg,
)
result = e.result
except Exception as e:
scan.setCacheValidation(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment