summaryrefslogtreecommitdiff
path: root/report
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-06-06 16:54:56 +0000
committerChristoph Helma <helma@in-silico.ch>2011-06-06 16:54:56 +0000
commit7bbc70d38d81a5a57d90c525d90ccf7bf8f59426 (patch)
tree34c43ef139456436b32ec42128c9162be8205d59 /report
parentb542cfbd54901ad86d60fed03c8a05f9151f7616 (diff)
halts (partially) substituted by OpenTox errors
Diffstat (limited to 'report')
-rwxr-xr-xreport/report_application.rb2
-rwxr-xr-xreport/report_persistance.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/report/report_application.rb b/report/report_application.rb
index 3c8670a..debfe07 100755
--- a/report/report_application.rb
+++ b/report/report_application.rb
@@ -7,7 +7,7 @@ end
def get_docbook_resource(filepath)
perform do |rs|
- halt 404,"not found: "+filepath unless File.exist?(filepath)
+ raise OpenTox::NotFoundError.new"not found: "+filepath unless File.exist?(filepath)
types = MIME::Types.type_for(filepath)
content_type(types[0].content_type) if types and types.size>0 and types[0]
result = body(File.new(filepath))
diff --git a/report/report_persistance.rb b/report/report_persistance.rb
index 78ae47b..e02387f 100755
--- a/report/report_persistance.rb
+++ b/report/report_persistance.rb
@@ -315,7 +315,7 @@ end
# unless prop_names.include?(key)
# err = "no attribute found: '"+k.to_s+"'"
# if $sinatra
-# $sinatra.halt 400,err
+# $sinatra.raise OpenTox::BadRequestError.newerr
# else
# raise err
# end