summaryrefslogtreecommitdiff
path: root/report/util.rb
diff options
context:
space:
mode:
Diffstat (limited to 'report/util.rb')
-rw-r--r--report/util.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/report/util.rb b/report/util.rb
index db783b3..ca5f3cc 100644
--- a/report/util.rb
+++ b/report/util.rb
@@ -1,4 +1,3 @@
-
# graph-files are generated in the tmp-dir before they are stored
ENV['TMP_DIR'] = File.join(FileUtils.pwd,"reports","tmp") unless ENV['TMP_DIR']
@@ -15,6 +14,7 @@ class Array
return self.collect{|word| word[prefix.size..-1]}
end
end
+ self
end
end
@@ -75,10 +75,10 @@ module Reports::Util
#
def self.check_group_matching( grouped_objects, match_attributes )
- raise Reports::BadRequest.new("less then 2 groups, no matching possible") if grouped_objects.size<2
+ raise OpenTox::BadRequestError.new("less then 2 groups, no matching possible") if grouped_objects.size<2
first_group = grouped_objects[0]
other_groups = grouped_objects[1..-1].collect{ |g| g.collect{|o| o }}
- other_groups.each{ |g| raise Reports::BadRequest.new("groups are not equally sized, matching impossible") if g.size != first_group.size }
+ other_groups.each{ |g| raise OpenTox::BadRequestError.new("groups are not equally sized, matching impossible") if g.size != first_group.size }
first_group.each do |o|
@@ -94,7 +94,7 @@ module Reports::Util
break
end
end
- raise Reports::BadRequest.new("no match found for "+inspect_attributes(o, match_attributes)) unless match
+ raise OpenTox::BadRequestError.new("no match found for "+inspect_attributes(o, match_attributes)) unless match
end
end
end