diff options
Diffstat (limited to 'engine.rb')
-rw-r--r-- | engine.rb | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |