Showing the changes to src/include/exceptions.h (1 of 10 files). Show all
Unified · Split
| @@ -60,7 +60,7 @@ namespace disvm · 59 unmodified lines | ||
| 60 | 60 | { } |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | − class invalid_utf8 : public vm_user_exception | |
| 63 | + class invalid_utf8 final : public vm_user_exception | |
| 64 | 64 | { |
| 65 | 65 | public: |
| 66 | 66 | explicit invalid_utf8() |
| @@ -84,7 +84,7 @@ namespace disvm · 17 unmodified lines | ||
| 84 | 84 | const char *operation; |
| 85 | 85 | }; |
| 86 | 86 | |
| 87 | − class type_violation : public vm_user_exception | |
| 87 | + class type_violation final : public vm_user_exception | |
| 88 | 88 | { |
| 89 | 89 | public: |
| 90 | 90 | explicit type_violation() |
| @@ -92,26 +92,23 @@ namespace disvm · 1 unmodified line | ||
| 92 | 92 | { } |
| 93 | 93 | }; |
| 94 | 94 | |
| 95 | − class out_of_range_memory final : public vm_user_exception | |
| 95 | + class out_of_range_memory : public vm_user_exception | |
| 96 | 96 | { |
| 97 | 97 | public: |
| 98 | 98 | explicit out_of_range_memory() |
| 99 | 99 | : vm_user_exception("Out of range access") |
| 100 | − , invalid_value{ 0 } | |
| 101 | − , range_defined{ false } | |
| 102 | − , valid_max{ 0 } | |
| 103 | − , valid_min{ 0 } | |
| 104 | 100 | { } |
| 101 | + }; | |
| 105 | 102 | |
| 106 | − explicit out_of_range_memory(word_t valid_min, word_t valid_max, word_t invalid_valid) | |
| 107 | − : vm_user_exception("Out of range access") | |
| 108 | − , invalid_value{ invalid_valid } | |
| 109 | − , range_defined{ true } | |
| 103 | + class index_out_of_range_memory final : public out_of_range_memory | |
| 104 | + { | |
| 105 | + public: | |
| 106 | + explicit index_out_of_range_memory(word_t valid_min, word_t valid_max, word_t invalid_value) | |
| 107 | + : invalid_value{ invalid_value } | |
| 110 | 108 | , valid_max{ valid_max } |
| 111 | 109 | , valid_min{ valid_min } |
| 112 | 110 | { } |
| 113 | 111 | |
| 114 | − const bool range_defined; | |
| 115 | 112 | const word_t valid_min; |
| 116 | 113 | const word_t valid_max; |
| 117 | 114 | const word_t invalid_value; |