diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-06-06 12:39:37 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-06-06 12:39:37 +0200 |
commit | f6a55a7121a61865d85ad7195371bd8fd784fb29 (patch) | |
tree | 9bf23b0d79c7e0e6ad4679e6d722d98a451caf62 /lazar.rb | |
parent | b435b145aea744ba951c12b4f6bf90ce62a5b0a3 (diff) |
removing several halt, adding debug message, getting smiles directly
Diffstat (limited to 'lazar.rb')
-rw-r--r-- | lazar.rb | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -37,8 +37,9 @@ end # @return [text/uri-list] Task URI post '/lazar/?' do + LOGGER.debug "building lazar model with params: "+params.inspect params[:subjectid] = @subjectid - halt 404, "No dataset_uri parameter." unless params[:dataset_uri] + raise OpenTox::NotFoundError.new "No dataset_uri parameter." unless params[:dataset_uri] dataset_uri = params[:dataset_uri] task = OpenTox::Task.create("Create lazar model",url_for('/lazar',:full)) do |task| @@ -75,7 +76,7 @@ post '/lazar/?' do if feature_generation_uri.match(/fminer/) lazar.feature_calculation_algorithm = "Substructure.match" else - halt 404, "External feature generation services not yet supported" + raise OpenTox::NotFoundError.new "External feature generation services not yet supported" end params[:subjectid] = @subjectid prediction_feature = OpenTox::Feature.find params[:prediction_feature], @subjectid @@ -87,7 +88,7 @@ post '/lazar/?' do end training_features.load_all(@subjectid) - halt 404, "Dataset #{feature_dataset_uri} not found." if training_features.nil? + raise OpenTox::NotFoundError.new "Dataset #{feature_dataset_uri} not found." if training_features.nil? # sorted features for index lookups |