Limit length of error messages in the job manager view.
authorCarl Hetherington <cth@carlh.net>
Tue, 20 Jan 2015 11:27:06 +0000 (11:27 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 20 Jan 2015 11:27:06 +0000 (11:27 +0000)
src/lib/job.cc

index 5b0b9c6044475a0b11c5e84318b09df409c60908..e11efa407375b03608fc077c327bcc0373ea8ec5 100644 (file)
@@ -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");
        }