summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-20 11:27:06 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-20 11:27:06 +0000
commitd926857355adf2b134fd8892b0a009ae90416e02 (patch)
treea94ec782d468ea3e1aa4e75b3f000bcd97b6d25f /src
parent685848363205628097b113c9c146bff118537829 (diff)
Limit length of error messages in the job manager view.
Diffstat (limited to 'src')
-rw-r--r--src/lib/job.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc
index 5b0b9c604..e11efa407 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -325,7 +325,11 @@ Job::status () const
} else if (finished_ok ()) {
s << String::compose (_("OK (ran for %1)"), seconds_to_hms (_ran_for));
} else if (finished_in_error ()) {
- s << String::compose (_("Error (%1)"), error_summary());
+ string es = error_summary ();
+ if (es.length() > 25) {
+ es = es.substr (0, 25) + "...";
+ }
+ s << String::compose (_("Error (%1)"), es);
} else if (finished_cancelled ()) {
s << _("Cancelled");
}