Skip to content

Reformat the Exceptions #349

Description

@Mustard2

At the moment most if not all of the exceptions are dealt with a simple try/except

try:
  # code
except Exception:
  # error message and cleanup

Maybe it would be better to create a wrapper over it (for instance a decorator on the codes of block called) which gives also better error messages (which we can extract from the e in except Exception as e:)

@catch_exception
block_that_should_not_fail()

Or at least catch the exception in some standard way for more complex cases:

try:
  # code
except Exception as e:
  exception_error_message(e, "Specific error message")
  #    -> "MustardUI Error - " + "Specific error message" + " : " + str(e)
  # cleanup

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions