mirror of
https://github.com/DanielSWolf/rhubarb-lip-sync.git
synced 2026-11-21 12:25:08 +00:00
Improved error message
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "TimeRange.h"
|
||||
#include <stdexcept>
|
||||
#include <ostream>
|
||||
#include <format.h>
|
||||
|
||||
using time_type = TimeRange::time_type;
|
||||
|
||||
@@ -13,7 +14,9 @@ TimeRange::TimeRange(time_type start, time_type end) :
|
||||
start(start),
|
||||
end(end)
|
||||
{
|
||||
if (start > end) throw std::invalid_argument("Start must not be less than end.");
|
||||
if (start > end) {
|
||||
throw std::invalid_argument(fmt::format("Time range start must not be less than end. Start: {0}, end: {1}", start, end));
|
||||
}
|
||||
}
|
||||
|
||||
time_type TimeRange::getStart() const {
|
||||
|
||||
Reference in New Issue
Block a user