From fd643be22a8ab9ae2114b7815bd1f3222ae553e4 Mon Sep 17 00:00:00 2001 From: Cyrus Wyett <34195737+cjwyett@users.noreply.github.com> Date: Mon, 3 Aug 2020 17:17:15 +0100 Subject: [PATCH 1/4] Solve issue #1365 Added link to docs --- src/tallies/tally.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tallies/tally.cpp b/src/tallies/tally.cpp index ecdf926139..3e77634821 100644 --- a/src/tallies/tally.cpp +++ b/src/tallies/tally.cpp @@ -240,10 +240,10 @@ score_str_to_int(std::string score_str) try { MT = std::stoi(score_str); } catch (const std::invalid_argument& ex) { - throw std::invalid_argument("Invalid tally score \"" + score_str + "\""); + throw std::invalid_argument("Invalid tally score \"" + score_str + "\ See the docs for more detail: https://docs.openmc.org/en/latest/usersguide/tallies.html#scores\"); } if (MT < 1) - throw std::invalid_argument("Invalid tally score \"" + score_str + "\""); + throw std::invalid_argument("Invalid tally score \"" + score_str + "\ See the docs for more detail: https://docs.openmc.org/en/latest/usersguide/tallies.html#scores\"); return MT; } From 518f352a08fbb0cd7749ef5af828a0f394886234 Mon Sep 17 00:00:00 2001 From: Cyrus Wyett <34195737+cjwyett@users.noreply.github.com> Date: Mon, 3 Aug 2020 18:02:37 +0100 Subject: [PATCH 2/4] hopefully --- src/tallies/tally.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tallies/tally.cpp b/src/tallies/tally.cpp index 3e77634821..c7e043e895 100644 --- a/src/tallies/tally.cpp +++ b/src/tallies/tally.cpp @@ -240,10 +240,10 @@ score_str_to_int(std::string score_str) try { MT = std::stoi(score_str); } catch (const std::invalid_argument& ex) { - throw std::invalid_argument("Invalid tally score \"" + score_str + "\ See the docs for more detail: https://docs.openmc.org/en/latest/usersguide/tallies.html#scores\"); + throw std::invalid_argument("Invalid tally score \"" + score_str + "\" See the docs for details: https://docs.openmc.org/en/latest/usersguide/tallies.html#scores"); } if (MT < 1) - throw std::invalid_argument("Invalid tally score \"" + score_str + "\ See the docs for more detail: https://docs.openmc.org/en/latest/usersguide/tallies.html#scores\"); + throw std::invalid_argument("Invalid tally score \"" + score_str + "\" See the docs for details: https://docs.openmc.org/en/latest/usersguide/tallies.html#scores"); return MT; } From 585ec0fc860ad1508ed605d7ebe5b12598e7599b Mon Sep 17 00:00:00 2001 From: Cyrus Wyett <34195737+cjwyett@users.noreply.github.com> Date: Tue, 4 Aug 2020 13:59:24 +0100 Subject: [PATCH 3/4] Update src/tallies/tally.cpp Brilliant! Thanks. Co-authored-by: Paul Romano --- src/tallies/tally.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tallies/tally.cpp b/src/tallies/tally.cpp index c7e043e895..533f931f16 100644 --- a/src/tallies/tally.cpp +++ b/src/tallies/tally.cpp @@ -243,7 +243,8 @@ score_str_to_int(std::string score_str) throw std::invalid_argument("Invalid tally score \"" + score_str + "\" See the docs for details: https://docs.openmc.org/en/latest/usersguide/tallies.html#scores"); } if (MT < 1) - throw std::invalid_argument("Invalid tally score \"" + score_str + "\" See the docs for details: https://docs.openmc.org/en/latest/usersguide/tallies.html#scores"); + throw std::invalid_argument("Invalid tally score \"" + score_str + "\". See the docs " + "for details: https://docs.openmc.org/en/stable/usersguide/tallies.html#scores"); return MT; } From 4b0c9eac77ca3da5d50a1bd5e85c61729e31d9c1 Mon Sep 17 00:00:00 2001 From: Cyrus Wyett <34195737+cjwyett@users.noreply.github.com> Date: Tue, 4 Aug 2020 19:07:07 +0100 Subject: [PATCH 4/4] Update src/tallies/tally.cpp Co-authored-by: Paul Romano --- src/tallies/tally.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tallies/tally.cpp b/src/tallies/tally.cpp index 533f931f16..5619c669c4 100644 --- a/src/tallies/tally.cpp +++ b/src/tallies/tally.cpp @@ -240,7 +240,8 @@ score_str_to_int(std::string score_str) try { MT = std::stoi(score_str); } catch (const std::invalid_argument& ex) { - throw std::invalid_argument("Invalid tally score \"" + score_str + "\" See the docs for details: https://docs.openmc.org/en/latest/usersguide/tallies.html#scores"); + throw std::invalid_argument("Invalid tally score \"" + score_str + "\". See the docs " + "for details: https://docs.openmc.org/en/stable/usersguide/tallies.html#scores"); } if (MT < 1) throw std::invalid_argument("Invalid tally score \"" + score_str + "\". See the docs "