Skip to content

Commit 72f02f2

Browse files
committed
raise ESDB::Exception for problems
1 parent 9ca031c commit 72f02f2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/esdb.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
module ESDB
2+
class Exception < Exception; end
3+
24
# Various Settings
35
# TODO: refactor
46
class << self

lib/esdb/resource.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def self.find(id)
5454
end
5555

5656
rescue
57-
nil
57+
raise ESDB::Exception
5858
end
5959

6060
# A kind of find_or_create - experimental.

0 commit comments

Comments
 (0)