poefy 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # Encoding: UTF-8
3
-
4
- ################################################################################
5
- # Handle error message.
6
- # Quit the program if called from console.
7
- ################################################################################
8
-
9
- module Poefy
10
-
11
- module HandleError
12
-
13
- private
14
-
15
- def handle_error msg, return_value = nil
16
- if Poefy.console
17
- STDERR.puts msg
18
- exit 1
19
- end
20
- return_value
21
- end
22
-
23
- def raise_error msg
24
- if Poefy.console
25
- STDERR.puts msg
26
- exit 1
27
- end
28
- raise msg
29
- end
30
-
31
- end
32
-
33
- end
34
-
35
- ################################################################################