m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/engine.rb
diff options
context:
space:
mode:
Diffstat (limited to 'engine.rb')
-rw-r--r--engine.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/engine.rb b/engine.rb
index b04e2f2..7b9ddf0 100644
--- a/engine.rb
+++ b/engine.rb
@@ -1,3 +1,6 @@
+class InvalidChecksumError < StandardError
+end
+
class Engine
def initialize hash
validate_checksum hash
@@ -6,7 +9,7 @@ class Engine
def validate_checksum hash
if !checksum_valid? hash
- throw 'Invalid state, checksum does not match!'
+ raise InvalidChecksumError
end
end