summaryrefslogtreecommitdiff
path: root/src/exceptions.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-02-10 21:35:38 +0100
committerCarl Hetherington <cth@carlh.net>2026-02-10 21:35:38 +0100
commitf0db2d5b9cfcbcefad688be6d83fba9fa212b98f (patch)
tree21009f6d545353b06f6f1be72a1d4dc36be09881 /src/exceptions.cc
parentee87162cb5405d68af62a84e6d2262854f9e3fc1 (diff)
Give line number in SubRip parsing exceptions.v1.6.59
Diffstat (limited to 'src/exceptions.cc')
-rw-r--r--src/exceptions.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exceptions.cc b/src/exceptions.cc
index d09be61..df9ae9a 100644
--- a/src/exceptions.cc
+++ b/src/exceptions.cc
@@ -31,8 +31,9 @@ ProgrammingError::ProgrammingError (string file, int line)
}
-SubripError::SubripError (string saw, string expecting, list<string> context)
- : runtime_error ("Error in SubRip file: saw " + (saw.empty() ? "an empty string" : saw) + " when expecting " + expecting)
+SubripError::SubripError(int line_number, string saw, string expecting, list<string> context)
+ : runtime_error(String::compose("Error in SubRip file line %1: saw %2 when expecting %3", line_number, saw.empty() ? "an empty string" : saw, expecting).c_str())
+ , _line_number(line_number)
, _context (context)
{