commit/galaxy-central: carlfeberhard: Datasets API: better error handling on api/datasets/display
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/3a6d4a323e3a/ Changeset: 3a6d4a323e3a User: carlfeberhard Date: 2013-04-30 20:06:12 Summary: Datasets API: better error handling on api/datasets/display Affected #: 1 file diff -r 746d59a574bbccdf5cedfbc7bd25a50b37d6667f -r 3a6d4a323e3ae7764a6a3704cf35b9dcb9b315f2 lib/galaxy/webapps/galaxy/api/datasets.py --- a/lib/galaxy/webapps/galaxy/api/datasets.py +++ b/lib/galaxy/webapps/galaxy/api/datasets.py @@ -68,8 +68,9 @@ return rval def _dataset_state( self, trans, dataset, **kwargs ): - """ Returns state of dataset. """ - + """ + Returns state of dataset. + """ msg = self.check_dataset_state( trans, dataset ) if not msg: msg = dataset.conversion_messages.DATA @@ -216,7 +217,7 @@ Displays history content (dataset). """ # Huge amount of code overlap with lib/galaxy/webapps/galaxy/api/history_content:show here. - hda_dict = {} + rval = '' try: # for anon users: #TODO: check login_required? @@ -233,6 +234,13 @@ check_ownership=True, check_accessible=True, deleted=False ) hda = self.get_history_dataset_association( trans, history, history_content_id, check_ownership=True, check_accessible=True ) - except: - raise - return hda.datatype.display_data(trans, hda, preview, filename, to_ext, chunk, **kwd) + + rval = hda.datatype.display_data( trans, hda, preview, filename, to_ext, chunk, **kwd ) + + except Exception, exception: + log.error( "Error getting display data for dataset (%s) from history (%s): %s", + history_content_id, history_id, str( exception ), exc_info=True ) + trans.response.status = 500 + rval = ( "Could not get display data for dataset: " + str( exception ) ) + + return rval Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org