[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 601f252 07/10: Throw any parser diagnostics f
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 601f252 07/10: Throw any parser diagnostics from interval_representation() |
Date: |
Mon, 6 Feb 2017 04:10:56 +0000 (UTC) |
branch: master
commit 601f2526a25c19ca4edad286d60ac23d96b49f0c
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Throw any parser diagnostics from interval_representation()
---
input_sequence.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/input_sequence.cpp b/input_sequence.cpp
index ae73a54..f85bde3 100644
--- a/input_sequence.cpp
+++ b/input_sequence.cpp
@@ -37,6 +37,7 @@
#include <iterator> // std::ostream_iterator
#include <ostream>
#include <sstream>
+#include <stdexcept>
ValueInterval::ValueInterval()
:value_number (0.0)
@@ -1003,6 +1004,11 @@ std::string InputSequence::mathematical_representation()
const
std::vector<ValueInterval> const& InputSequence::interval_representation()
const
{
+ if(!formatted_diagnostics().empty())
+ {
+ throw std::runtime_error(formatted_diagnostics());
+ }
+
return intervals_;
}
- [lmi-commits] [lmi] master updated (97d2acd -> 6eb2614), Greg Chicares, 2017/02/05
- [lmi-commits] [lmi] master 934e2f6 04/10: Emphasize that [lr]trim() removes no internal superfluity, Greg Chicares, 2017/02/05
- [lmi-commits] [lmi] master 3e089d5 03/10: Fix defect introduced 20110801T2357Z: arguments omitted, Greg Chicares, 2017/02/05
- [lmi-commits] [lmi] master e52e02c 02/10: GUI sequence parser diagnostics: generalize code, improve documentation, Greg Chicares, 2017/02/05
- [lmi-commits] [lmi] master 987adcc 06/10: Get sequence parser diagnostics from exception, not function, Greg Chicares, 2017/02/05
- [lmi-commits] [lmi] master 6eb2614 10/10: Improve unit test, Greg Chicares, 2017/02/05
- [lmi-commits] [lmi] master 601f252 07/10: Throw any parser diagnostics from interval_representation(),
Greg Chicares <=
- [lmi-commits] [lmi] master aee673f 05/10: Fix defect introduced 20170205T2107Z: fixed the wrong problem, Greg Chicares, 2017/02/05
- [lmi-commits] [lmi] master e411ac4 09/10: Throw any parser errors from all *_representation() functions, Greg Chicares, 2017/02/05
- [lmi-commits] [lmi] master 502fedc 01/10: Improve [lr]trim unit test and documentation, Greg Chicares, 2017/02/05
- [lmi-commits] [lmi] master 4f05707 08/10: Omit unhelpful file name and line number from a warning, Greg Chicares, 2017/02/05