mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
942cf50735
Package revng's python code in two wheels: `revng` and `revng_internal`.
The revng wheel contains the
`revng.{pipeline_description,model,tupletree}` modules, while the
`revng_internal` one everything under `revng.internal`.
23 lines
653 B
Python
23 lines
653 B
Python
#
|
|
# This file is distributed under the MIT License. See LICENSE.md for details.
|
|
#
|
|
|
|
|
|
class RevngException(Exception):
|
|
pass
|
|
|
|
|
|
class RevngDocumentException(RevngException):
|
|
def __init__(self, document_error):
|
|
self.document_error = document_error
|
|
error_text = "Document Error with the following reasons:\n"
|
|
for reason in document_error.reasons:
|
|
error_text += f"* {reason.message} at {reason.location}\n"
|
|
super().__init__(error_text)
|
|
|
|
|
|
class RevngSimpleException(RevngException):
|
|
def __init__(self, simple_error):
|
|
self.simple_error = simple_error
|
|
super().__init__(simple_error.message)
|