Commit 9526393a authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

[widgets][plotterparameterseditor] Use ValueError instead of Exception

logging.exception instead of logging.error
parent 346fa3bc
Pipeline #41561 passed with stage
in 26 minutes and 29 seconds
......@@ -131,10 +131,9 @@ class RestrictedParameterWidget(QWidget):
cast_fn = np.cast[self._type] if self._type != "string" else str
default = cast_fn(default)
except Exception:
except ValueError:
f"Failed to convert the default value: {default} to type {self._type}",
default = cast_fn("" if self._type == "string" else 0)
self.default = default
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