From 9e60ae87ba874467d868b25cccddf3e60ee27a12 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Sun, 5 May 2019 23:47:44 +0200 Subject: [PATCH] better text error --- include/nana/gui/place.hpp | 2 +- source/gui/place.cpp | 18 ++++++++++-------- source/gui/place_parts.hpp | 8 ++++---- source/gui/widgets/categorize.cpp | 4 ++-- source/gui/widgets/group.cpp | 10 +++++----- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/include/nana/gui/place.hpp b/include/nana/gui/place.hpp index f90298ab..a7a56f17 100644 --- a/include/nana/gui/place.hpp +++ b/include/nana/gui/place.hpp @@ -139,7 +139,7 @@ namespace nana { return name && (*name == '_' || (('a' <= *name && *name <= 'z') || ('A' <= *name && *name <= 'Z'))); } - void modify(const char* field_name, const char* div_text); ///< Modifies a specified field. + void modify(const char* field_name, const char* div_text); ///< Modifies a specified field. May throw placa::error field_reference field(const char* name);///< Returns a field with the specified name. diff --git a/source/gui/place.cpp b/source/gui/place.cpp index c050421f..b29d98b0 100644 --- a/source/gui/place.cpp +++ b/source/gui/place.cpp @@ -1,14 +1,14 @@ -/* +/** * An Implementation of Place for Layout * Nana C++ Library(http://www.nanapro.org) * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. - * (See accompanying file LICENSE_1_0.txt or copy at + * (See accompanying file LICENSE or copy at * http://www.boost.org/LICENSE_1_0.txt) * - * @file: nana/gui/place.cpp - * @contributors: Ariel Vina-Rodriguez + * @file nana/gui/place.cpp + * @contributors Ariel Vina-Rodriguez * dankan1890(PR#156) */ @@ -3674,10 +3674,12 @@ namespace nana std::string field, std::string::size_type pos) - : std::invalid_argument{ "nana::place error " + what - + " from widget '" + API::window_caption(plc.window_handle()).substr(0,80) - + "' in fleld '" + field - + (pos == std::string::npos ? "' " : "' at at position " + std::to_string(pos)) + : std::invalid_argument{ "from widget '" + + API::window_caption(plc.window_handle()).substr(0,80) + + "'; nana::place error " + + what + + "' in field '" + field + + (pos == std::string::npos ? "' " : "' at position " + std::to_string(pos)) + " in div_text:\n" + plc.div() }, base_what{ what }, owner_caption{ API::window_caption(plc.window_handle()).substr(0,80) }, diff --git a/source/gui/place_parts.hpp b/source/gui/place_parts.hpp index 2105dd02..97295d60 100644 --- a/source/gui/place_parts.hpp +++ b/source/gui/place_parts.hpp @@ -1,13 +1,13 @@ -/* +/** * Parts of Class Place * Nana C++ Library(http://www.nanapro.org) - * Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. - * (See accompanying file LICENSE_1_0.txt or copy at + * (See accompanying file LICENSE or copy at * http://www.boost.org/LICENSE_1_0.txt) * - * @file: nana/gui/place_parts.hpp + * @file nana/gui/place_parts.hpp */ #ifndef NANA_GUI_PLACE_PARTS_HPP #define NANA_GUI_PLACE_PARTS_HPP diff --git a/source/gui/widgets/categorize.cpp b/source/gui/widgets/categorize.cpp index 19d3ab23..fc88b2cc 100644 --- a/source/gui/widgets/categorize.cpp +++ b/source/gui/widgets/categorize.cpp @@ -1,4 +1,4 @@ -/* +/** * A Categorize Implementation * Nana C++ Library(http://www.nanapro.org) * Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com) @@ -7,7 +7,7 @@ * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * - * @file: nana/gui/widgets/categorize.cpp + * @file nana/gui/widgets/categorize.cpp */ #include diff --git a/source/gui/widgets/group.cpp b/source/gui/widgets/group.cpp index 726814e8..b22b662b 100644 --- a/source/gui/widgets/group.cpp +++ b/source/gui/widgets/group.cpp @@ -1,19 +1,19 @@ /** * A group widget implementation * Nana C++ Library(http://www.nanaro.org) - * Copyright(C) 2015-2018 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2015-2019 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. - * (See accompanying file LICENSE_1_0.txt or copy at + * (See accompanying file LICENSE or copy at * http://www.boost.org/LICENSE_1_0.txt) * - * @file: nana/gui/widgets/group.cpp + * @file nana/gui/widgets/group.cpp * - * @Author: Stefan Pfeifer(st-321), Ariel Vina-Rodriguez (qPCR4vir) + * @author Stefan Pfeifer(st-321), Ariel Vina-Rodriguez (qPCR4vir) * * @brief group is a widget used to visually group and layout other widgets. * - * @contributor: + * @contributor * dankan1890(https://github.com/dankan1890) */