hflr 1.5.1 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/hflr.gemspec +1 -1
- data/lib/hflr/record_template.rb +5 -0
- metadata +1 -1
data/hflr.gemspec
CHANGED
data/lib/hflr/record_template.rb
CHANGED
@@ -107,6 +107,7 @@ def self.check_record_layouts(layouts)
|
|
107
107
|
end
|
108
108
|
|
109
109
|
def self.create_template_class(record_type, record_type_label, layout, first_column_location, extra_columns = nil)
|
110
|
+
begin
|
110
111
|
names = layout.map {|l| l.name.to_sym}
|
111
112
|
names = add_extra_columns(names, extra_columns)
|
112
113
|
structure = Struct.new(*names)
|
@@ -115,6 +116,10 @@ def self.create_template_class(record_type, record_type_label, layout, first_col
|
|
115
116
|
structure,
|
116
117
|
self.get_pattern(layout, first_column_location),
|
117
118
|
layout.map{|v| v.len})
|
119
|
+
rescue Exception=>msg
|
120
|
+
raise "Problem adding extra columns for record type #{record_type} with label #{record_type_label} #{msg.to_s} #{msg.backtrace}"
|
121
|
+
end
|
122
|
+
|
118
123
|
end
|
119
124
|
|
120
125
|
|