From 21633bc0bafb7cc52fd7ab7c8ed1c9d0e84c5c00 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 27 Oct 2017 21:28:39 +0200 Subject: [PATCH] throw std::invalid_argument instead of std::exception --- xs/xsp/Print.xsp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp index 7565de474..852f0dde0 100644 --- a/xs/xsp/Print.xsp +++ b/xs/xsp/Print.xsp @@ -215,7 +215,11 @@ _constant() bool has_infinite_skirt(); bool has_skirt(); std::vector extruders() const; - void validate() %code%{ std::string err = THIS->validate(); if (! err.empty()) throw std::exception(err.c_str()); %}; + void validate() %code%{ + std::string err = THIS->validate(); + if (! err.empty()) + throw std::invalid_argument(err.c_str()); + %}; Clone bounding_box(); Clone total_bounding_box(); double skirt_first_layer_height();