first "working" version of place::error - compiles and run when Ok

tested with some errors as espected
This commit is contained in:
qPCR4vir
2019-05-03 14:52:28 +02:00
parent 003ffee01a
commit 74b486e267
2 changed files with 359 additions and 328 deletions

View File

@@ -107,22 +107,10 @@ namespace nana
class error :public std::invalid_argument
{
public:
error( const std::string& what,
const place& plc,
std::string field = "unknown",
std::string::size_type pos = std::string::npos)
: std::invalid_argument{ "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) )
+ "in div_text:\n" + plc.div()},
base_what { what },
owner_caption{ API::window_caption(plc.window_handle()).substr(0,80) },
field { field },
div_text { plc.div() },
pos { pos }
{}
error( const std::string& what,
const place& plc,
std::string field = "unknown",
std::string::size_type pos = std::string::npos);
std::string base_what;
std::string owner_caption; ///< truncate caption (title) of the "placed" widget
std::string div_text; ///< involved div_text