From 0b64779ad95c7db741ef68a36a58b1fa3f7f5cac Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 16 May 2011 14:50:55 +0000 Subject: typo in error message Model not found fixed --- application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application.rb') diff --git a/application.rb b/application.rb index 866a267..ba3c1a1 100644 --- a/application.rb +++ b/application.rb @@ -22,7 +22,7 @@ before do @uri = uri @id @yaml_file = "public/#{@id}.yaml" - halt 404, "Dataset #{@id} not found." unless File.exists? @yaml_file + halt 404, "Model #{@id} not found." unless File.exists? @yaml_file end # make sure subjectid is not included in params, subjectid is set as member variable -- cgit v1.2.3 From a1e196ecbfcd40adbe6221c264adcf653a388d57 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 6 Jun 2011 16:54:56 +0000 Subject: halts (partially) substituted by OpenTox errors --- application.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application.rb') diff --git a/application.rb b/application.rb index 6e1dcd7..c03d1b7 100644 --- a/application.rb +++ b/application.rb @@ -23,7 +23,7 @@ before do @uri = uri @id @yaml_file = "public/#{@id}.yaml" - halt 404, "Model #{@id} not found." unless File.exists? @yaml_file + raise OpenTox::NotFoundError.new "Model #{@id} not found." unless File.exists? @yaml_file end # make sure subjectid is not included in params, subjectid is set as member variable @@ -77,7 +77,7 @@ delete '/:id/?' do response['Content-Type'] = 'text/plain' "Model #{@id} deleted." rescue - halt 404, "Model #{@id} does not exist." + raise OpenTox::NotFoundError.new "Model #{@id} does not exist." end end -- cgit v1.2.3 From 400f8a894bbd0f781735fd94e9707ef8ff8fc577 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 23 Jun 2011 13:16:12 +0000 Subject: lazar predictions fixed --- application.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application.rb') diff --git a/application.rb b/application.rb index c03d1b7..7d3de38 100644 --- a/application.rb +++ b/application.rb @@ -69,9 +69,9 @@ delete '/:id/?' do if @subjectid and !File.exists? @yaml_file and @uri begin res = OpenTox::Authorization.delete_policies_from_uri(@uri, @subjectid) - LOGGER.debug "Policy deleted for Dataset URI: #{@uri} with result: #{res}" + LOGGER.debug "Policy deleted for Model URI: #{@uri} with result: #{res}" rescue - LOGGER.warn "Policy delete error for Dataset URI: #{@uri}" + LOGGER.warn "Policy delete error for Model URI: #{@uri}" end end response['Content-Type'] = 'text/plain' -- cgit v1.2.3