Mercurial > kallithea
changeset 4429:b141bae7e44a
diff: don't just redirect on 2way errors - show the error so it can be fixed
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 12 Aug 2014 13:08:23 +0200 |
parents | 0e60c5bb34f0 |
children | 3dda68220092 |
files | kallithea/controllers/files.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/files.py Tue Aug 12 13:08:23 2014 +0200 +++ b/kallithea/controllers/files.py Tue Aug 12 13:08:23 2014 +0200 @@ -739,10 +739,10 @@ else: c.changeset_2 = EmptyChangeset(repo=c.db_repo_scm_instance) node2 = FileNode(f_path, '', changeset=c.changeset_2) - except (RepositoryError, NodeError): - log.error(traceback.format_exc()) - return redirect(url('files_home', repo_name=c.repo_name, - f_path=f_path)) + except ChangesetDoesNotExistError as e: + msg = _('Such revision does not exist for this repository') + h.flash(msg, category='error') + raise HTTPNotFound() c.node1 = node1 c.node2 = node2 c.cs1 = c.changeset_1