Module glasswall.libraries.rebuild.errors

Expand source code
from glasswall.libraries.rebuild.classes import RebuildError


class UnknownErrorCode(RebuildError):
    """ Unknown error code. """
    pass


# Statuses from sdk.rebuild\src\code\dll.gwfile\dll.gwfilestatus.h
class Error(RebuildError):
    """ Rebuild error code 0. This value indicates that the document was non-conformant in some way, but any requested output files were written. """
    pass


class SuccessDocumentWriteFailure(RebuildError):
    """ Rebuild error code -1. This value indicates that the document was managed successfully, but a failure occured when writing the managed version of the document to file. """
    pass


class SuccessAnalysisWriteFailure(RebuildError):
    """ Rebuild error code -2. This value indicates that the document was analysed successfully, but a failure occured when writing the analysis of the document to file. """
    pass


class ErrorAnalysisWriteFailure(RebuildError):
    """ Rebuild error code -3. This value indicates that the document was non-conformant in some way, and a failure occured when writing the analysis of the document to file. """
    pass


class SuccessReportWriteFailure(RebuildError):
    """ Rebuild error code -4. This value indicates that the document was processed successfully, but that a failure occured when writing the processing report to file. """
    pass


class SuccessDocumentReportWriteFailure(RebuildError):
    """ Rebuild error code -5. This value indicates that the document was managed successfully, but a failure occured when writing both the managed version of the document and the processing report to file. """
    pass


class ErrorReportWriteFailure(RebuildError):
    """ Rebuild error code -6. This value indicates that the document was non-conformant in some way,  and that a failure occured when writing the processing report to file. """
    pass


class SuccessAnalysisReportWriteFailure(RebuildError):
    """ Rebuild error code -7. This value indicates that the document was analysed successfully, but a failure occured when writing both the analysis of the document and the processing report to file. """
    pass


class ErrorAnalysisReportWriteFailure(RebuildError):
    """ Rebuild error code -8. This value indicates that the document was non-conformant in some way, but a failure occured when writing both the analysis of the document and the processing report to file. """
    pass


class InternalError(RebuildError):
    """ Rebuild error code -9. This value indicates an uncategorised error """
    pass


class SuccessDocumentAnalysisReportWriteFailure(RebuildError):
    """ Rebuild error code -10. This value indicates that the document was analysed successfully, but failures occured when writing the document, the analysis of the document and the processing report to file (AMP mode). """
    pass


class SuccessDocumentAnalysisWriteFailure(RebuildError):
    """ Rebuild error code -11. This value indicates that the document was analysed successfully, but failures occured when writing the document and the analysis of the document to file (AMP mode). """
    pass


class SuccessExportWriteFailure(RebuildError):
    """ Rebuild error code -12. This value indicates that the document was exported successfully, but failures occured when writing the archive package. (Export mode) """
    pass


class ErrorExportWriteFailure(RebuildError):
    """ Rebuild error code -13. This value indicates that the document was non-conformant in some way, and failures occured when writing the archive package. (Export mode) """
    pass


error_codes = {
    0: Error,
    -1: SuccessDocumentWriteFailure,
    -2: SuccessAnalysisWriteFailure,
    -3: ErrorAnalysisWriteFailure,
    -4: SuccessReportWriteFailure,
    -5: SuccessDocumentReportWriteFailure,
    -6: ErrorReportWriteFailure,
    -7: SuccessAnalysisReportWriteFailure,
    -8: ErrorAnalysisReportWriteFailure,
    -9: InternalError,
    -10: SuccessDocumentAnalysisReportWriteFailure,
    -11: SuccessDocumentAnalysisWriteFailure,
    -12: SuccessExportWriteFailure,
    -13: ErrorExportWriteFailure,
}

Classes

class Error (*args, **kwargs)

Rebuild error code 0. This value indicates that the document was non-conformant in some way, but any requested output files were written.

Expand source code
class Error(RebuildError):
    """ Rebuild error code 0. This value indicates that the document was non-conformant in some way, but any requested output files were written. """
    pass

Ancestors

class ErrorAnalysisReportWriteFailure (*args, **kwargs)

Rebuild error code -8. This value indicates that the document was non-conformant in some way, but a failure occured when writing both the analysis of the document and the processing report to file.

Expand source code
class ErrorAnalysisReportWriteFailure(RebuildError):
    """ Rebuild error code -8. This value indicates that the document was non-conformant in some way, but a failure occured when writing both the analysis of the document and the processing report to file. """
    pass

Ancestors

class ErrorAnalysisWriteFailure (*args, **kwargs)

Rebuild error code -3. This value indicates that the document was non-conformant in some way, and a failure occured when writing the analysis of the document to file.

Expand source code
class ErrorAnalysisWriteFailure(RebuildError):
    """ Rebuild error code -3. This value indicates that the document was non-conformant in some way, and a failure occured when writing the analysis of the document to file. """
    pass

Ancestors

class ErrorExportWriteFailure (*args, **kwargs)

Rebuild error code -13. This value indicates that the document was non-conformant in some way, and failures occured when writing the archive package. (Export mode)

Expand source code
class ErrorExportWriteFailure(RebuildError):
    """ Rebuild error code -13. This value indicates that the document was non-conformant in some way, and failures occured when writing the archive package. (Export mode) """
    pass

Ancestors

class ErrorReportWriteFailure (*args, **kwargs)

Rebuild error code -6. This value indicates that the document was non-conformant in some way, and that a failure occured when writing the processing report to file.

Expand source code
class ErrorReportWriteFailure(RebuildError):
    """ Rebuild error code -6. This value indicates that the document was non-conformant in some way,  and that a failure occured when writing the processing report to file. """
    pass

Ancestors

class InternalError (*args, **kwargs)

Rebuild error code -9. This value indicates an uncategorised error

Expand source code
class InternalError(RebuildError):
    """ Rebuild error code -9. This value indicates an uncategorised error """
    pass

Ancestors

class SuccessAnalysisReportWriteFailure (*args, **kwargs)

Rebuild error code -7. This value indicates that the document was analysed successfully, but a failure occured when writing both the analysis of the document and the processing report to file.

Expand source code
class SuccessAnalysisReportWriteFailure(RebuildError):
    """ Rebuild error code -7. This value indicates that the document was analysed successfully, but a failure occured when writing both the analysis of the document and the processing report to file. """
    pass

Ancestors

class SuccessAnalysisWriteFailure (*args, **kwargs)

Rebuild error code -2. This value indicates that the document was analysed successfully, but a failure occured when writing the analysis of the document to file.

Expand source code
class SuccessAnalysisWriteFailure(RebuildError):
    """ Rebuild error code -2. This value indicates that the document was analysed successfully, but a failure occured when writing the analysis of the document to file. """
    pass

Ancestors

class SuccessDocumentAnalysisReportWriteFailure (*args, **kwargs)

Rebuild error code -10. This value indicates that the document was analysed successfully, but failures occured when writing the document, the analysis of the document and the processing report to file (AMP mode).

Expand source code
class SuccessDocumentAnalysisReportWriteFailure(RebuildError):
    """ Rebuild error code -10. This value indicates that the document was analysed successfully, but failures occured when writing the document, the analysis of the document and the processing report to file (AMP mode). """
    pass

Ancestors

class SuccessDocumentAnalysisWriteFailure (*args, **kwargs)

Rebuild error code -11. This value indicates that the document was analysed successfully, but failures occured when writing the document and the analysis of the document to file (AMP mode).

Expand source code
class SuccessDocumentAnalysisWriteFailure(RebuildError):
    """ Rebuild error code -11. This value indicates that the document was analysed successfully, but failures occured when writing the document and the analysis of the document to file (AMP mode). """
    pass

Ancestors

class SuccessDocumentReportWriteFailure (*args, **kwargs)

Rebuild error code -5. This value indicates that the document was managed successfully, but a failure occured when writing both the managed version of the document and the processing report to file.

Expand source code
class SuccessDocumentReportWriteFailure(RebuildError):
    """ Rebuild error code -5. This value indicates that the document was managed successfully, but a failure occured when writing both the managed version of the document and the processing report to file. """
    pass

Ancestors

class SuccessDocumentWriteFailure (*args, **kwargs)

Rebuild error code -1. This value indicates that the document was managed successfully, but a failure occured when writing the managed version of the document to file.

Expand source code
class SuccessDocumentWriteFailure(RebuildError):
    """ Rebuild error code -1. This value indicates that the document was managed successfully, but a failure occured when writing the managed version of the document to file. """
    pass

Ancestors

class SuccessExportWriteFailure (*args, **kwargs)

Rebuild error code -12. This value indicates that the document was exported successfully, but failures occured when writing the archive package. (Export mode)

Expand source code
class SuccessExportWriteFailure(RebuildError):
    """ Rebuild error code -12. This value indicates that the document was exported successfully, but failures occured when writing the archive package. (Export mode) """
    pass

Ancestors

class SuccessReportWriteFailure (*args, **kwargs)

Rebuild error code -4. This value indicates that the document was processed successfully, but that a failure occured when writing the processing report to file.

Expand source code
class SuccessReportWriteFailure(RebuildError):
    """ Rebuild error code -4. This value indicates that the document was processed successfully, but that a failure occured when writing the processing report to file. """
    pass

Ancestors

class UnknownErrorCode (*args, **kwargs)

Unknown error code.

Expand source code
class UnknownErrorCode(RebuildError):
    """ Unknown error code. """
    pass

Ancestors