prep 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/core/prep.rb +12 -1
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -19,6 +19,17 @@ require File.join(File.dirname(__FILE__), "..", "mm2pixcel")
19
19
 
20
20
  module PREP
21
21
  module Core
22
+ # PREP 用例外
23
+ #
24
+ # 帳票生成時に発生するあらゆる例外を補足して再発生させる際に利用
25
+ class PrepError < StandardError
26
+ # 元々のエラー
27
+ attr_reader :original_error
28
+
29
+ def initialize(error)
30
+ @original_error = error
31
+ end
32
+ end
22
33
  # PREP の中心クラス
23
34
  class Prep
24
35
  attr_reader :pdf, :pages, :page_pos_x, :page_pos_y, :values
@@ -74,7 +85,7 @@ module PREP
74
85
  rescue => e
75
86
  @pdf.save_to_file(output_file_path) if ENV["DEBUG"]
76
87
  puts "Error occured!!\n#{e}"
77
- raise e
88
+ raise PrepError.new(e)
78
89
  end
79
90
 
80
91
  # ページの初期化
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prep
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tetsuhisa MAKINO