glasswall.libraries.rebuild.errors

  1# Statuses from sdk.rebuild\src\code\dll.gwfile\dll.gwfilestatus.h
  2
  3
  4from glasswall.libraries.rebuild.classes import RebuildError
  5
  6
  7class UnknownErrorCode(RebuildError):
  8    """ Unknown error code. """
  9    pass
 10
 11
 12class Error(RebuildError):
 13    """ Rebuild error code 0. This value indicates that the document was non-conformant in some way, but any requested output files were written. """
 14    pass
 15
 16
 17class SuccessDocumentWriteFailure(RebuildError):
 18    """ 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. """
 19    pass
 20
 21
 22class SuccessAnalysisWriteFailure(RebuildError):
 23    """ 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. """
 24    pass
 25
 26
 27class ErrorAnalysisWriteFailure(RebuildError):
 28    """ 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. """
 29    pass
 30
 31
 32class SuccessReportWriteFailure(RebuildError):
 33    """ 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. """
 34    pass
 35
 36
 37class SuccessDocumentReportWriteFailure(RebuildError):
 38    """ 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. """
 39    pass
 40
 41
 42class ErrorReportWriteFailure(RebuildError):
 43    """ 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. """
 44    pass
 45
 46
 47class SuccessAnalysisReportWriteFailure(RebuildError):
 48    """ 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. """
 49    pass
 50
 51
 52class ErrorAnalysisReportWriteFailure(RebuildError):
 53    """ 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. """
 54    pass
 55
 56
 57class InternalError(RebuildError):
 58    """ Rebuild error code -9. This value indicates an uncategorised error """
 59    pass
 60
 61
 62class SuccessDocumentAnalysisReportWriteFailure(RebuildError):
 63    """ 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). """
 64    pass
 65
 66
 67class SuccessDocumentAnalysisWriteFailure(RebuildError):
 68    """ 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). """
 69    pass
 70
 71
 72class SuccessExportWriteFailure(RebuildError):
 73    """ Rebuild error code -12. This value indicates that the document was exported successfully, but failures occured when writing the archive package. (Export mode) """
 74    pass
 75
 76
 77class ErrorExportWriteFailure(RebuildError):
 78    """ 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) """
 79    pass
 80
 81
 82class ErrorRejectedFileFailure(RebuildError):
 83    """ Rebuild error code -16. This value indicates that the document was processed successfully but rejected based on policy. """
 84    pass
 85
 86
 87error_codes = {
 88    0: Error,
 89    -1: SuccessDocumentWriteFailure,
 90    -2: SuccessAnalysisWriteFailure,
 91    -3: ErrorAnalysisWriteFailure,
 92    -4: SuccessReportWriteFailure,
 93    -5: SuccessDocumentReportWriteFailure,
 94    -6: ErrorReportWriteFailure,
 95    -7: SuccessAnalysisReportWriteFailure,
 96    -8: ErrorAnalysisReportWriteFailure,
 97    -9: InternalError,
 98    -10: SuccessDocumentAnalysisReportWriteFailure,
 99    -11: SuccessDocumentAnalysisWriteFailure,
100    -12: SuccessExportWriteFailure,
101    -13: ErrorExportWriteFailure,
102    -16: ErrorRejectedFileFailure,
103}
class UnknownErrorCode(glasswall.libraries.rebuild.classes.RebuildError):
 8class UnknownErrorCode(RebuildError):
 9    """ Unknown error code. """
10    pass

Unknown error code.

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

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

class SuccessDocumentWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
18class SuccessDocumentWriteFailure(RebuildError):
19    """ 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. """
20    pass

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.

class SuccessAnalysisWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
23class SuccessAnalysisWriteFailure(RebuildError):
24    """ 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. """
25    pass

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.

class ErrorAnalysisWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
28class ErrorAnalysisWriteFailure(RebuildError):
29    """ 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. """
30    pass

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.

class SuccessReportWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
33class SuccessReportWriteFailure(RebuildError):
34    """ 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. """
35    pass

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.

class SuccessDocumentReportWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
38class SuccessDocumentReportWriteFailure(RebuildError):
39    """ 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. """
40    pass

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.

class ErrorReportWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
43class ErrorReportWriteFailure(RebuildError):
44    """ 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. """
45    pass

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.

class SuccessAnalysisReportWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
48class SuccessAnalysisReportWriteFailure(RebuildError):
49    """ 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. """
50    pass

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.

class ErrorAnalysisReportWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
53class ErrorAnalysisReportWriteFailure(RebuildError):
54    """ 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. """
55    pass

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.

class InternalError(glasswall.libraries.rebuild.classes.RebuildError):
58class InternalError(RebuildError):
59    """ Rebuild error code -9. This value indicates an uncategorised error """
60    pass

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

class SuccessDocumentAnalysisReportWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
63class SuccessDocumentAnalysisReportWriteFailure(RebuildError):
64    """ 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). """
65    pass

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).

class SuccessDocumentAnalysisWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
68class SuccessDocumentAnalysisWriteFailure(RebuildError):
69    """ 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). """
70    pass

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).

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

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

class ErrorExportWriteFailure(glasswall.libraries.rebuild.classes.RebuildError):
78class ErrorExportWriteFailure(RebuildError):
79    """ 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) """
80    pass

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)

class ErrorRejectedFileFailure(glasswall.libraries.rebuild.classes.RebuildError):
83class ErrorRejectedFileFailure(RebuildError):
84    """ Rebuild error code -16. This value indicates that the document was processed successfully but rejected based on policy. """
85    pass

Rebuild error code -16. This value indicates that the document was processed successfully but rejected based on policy.

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