X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fexceptions.cc;h=d09be61ae8927bbce41826b75fd9890ecc46c7c9;hb=refs%2Fheads%2Fmain;hp=4d9d29f027b1775c6fc7f0f0bb282b9cbe7a5332;hpb=44ff188fa75cb7954fb1b9bec6b1cb03d8536ef7;p=libsub.git diff --git a/src/exceptions.cc b/src/exceptions.cc index 4d9d29f..d09be61 100644 --- a/src/exceptions.cc +++ b/src/exceptions.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2015 Carl Hetherington + Copyright (C) 2014-2021 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ #include "compose.hpp" #include "exceptions.h" +using std::list; using std::string; using namespace sub; @@ -28,3 +29,19 @@ ProgrammingError::ProgrammingError (string file, int line) { } + + +SubripError::SubripError (string saw, string expecting, list context) + : runtime_error ("Error in SubRip file: saw " + (saw.empty() ? "an empty string" : saw) + " when expecting " + expecting) + , _context (context) +{ + +} + + +WebVTTError::WebVTTError(string saw, string expecting, list context) + : runtime_error("Error in WebVTT file: saw " + (saw.empty() ? "an empty string" : saw) + " when expecting " + expecting) + , _context(context) +{ + +}