From: Arvin Schnell Date: Wed, 2 Apr 2014 10:17:45 +0000 (+0200) Subject: - work on error handling X-Git-Tag: v0.2.2~11^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F60%2Fhead;p=thirdparty%2Fsnapper.git - work on error handling --- diff --git a/snapper/Btrfs.cc b/snapper/Btrfs.cc index 695bd662..0d0d9e00 100644 --- a/snapper/Btrfs.cc +++ b/snapper/Btrfs.cc @@ -1242,7 +1242,10 @@ namespace snapper Regex rx("^.snapshots/([0-9]*)/snapshot"); if (!rx.match(name)) + { + y2err("get default failed, strange name"); throw IOErrorException(); + } int num = 0; rx.cap(1) >> num; @@ -1250,6 +1253,7 @@ namespace snapper } catch (const runtime_error& e) { + y2err("get default failed, " << e.what()); throw IOErrorException(); } } @@ -1277,6 +1281,7 @@ namespace snapper } catch (const runtime_error& e) { + y2err("set default failed, " << e.what()); throw IOErrorException(); } }