From 592e2853e08155d375b0ae8712ccf1cc43ce64a9 Mon Sep 17 00:00:00 2001 From: Thomas Lauf Date: Tue, 18 Sep 2018 20:11:10 +0200 Subject: [PATCH] Move debug output about overlaps where it matters --- src/validate.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/validate.cpp b/src/validate.cpp index 8ef75d07..bd15c629 100644 --- a/src/validate.cpp +++ b/src/validate.cpp @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2015 - 2016, Thomas Lauf, Paul Beckingham, Federico Hernandez. +// Copyright 2015 - 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -98,13 +98,17 @@ static void autoAdjust ( Interval& interval) { auto overlaps = getOverlaps (database, rules, interval); - debug ("Input " + interval.dump ()); - debug ("Overlaps with"); - for (auto& overlap : overlaps) - debug (" " + overlap.dump ()); if (! overlaps.empty ()) { + debug ("Input " + interval.dump ()); + debug ("Overlaps with"); + + for (auto& overlap : overlaps) + { + debug (" " + overlap.dump ()); + } + if (! adjust) throw std::string("You cannot overlap intervals. Correct the start/end " "time, or specify the :adjust hint.");