Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libstorage-ng for openSUSE:Factory checked in at 2026-09-11 19:01:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Fri Sep 11 19:01:14 2026 rev:350 rq:1376950 version:4.5.352 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2026-08-25 13:18:22.910347181 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1265/libstorage-ng.changes 2026-09-11 19:02:06.965580670 +0200 @@ -1,0 +2,72 @@ +Thu Sep 10 14:27:24 UTC 2026 - [email protected] + +- merge gh#openSUSE/libstorage-ng#1096 +- improved testsuite +- 4.5.352 + +-------------------------------------------------------------------- +Thu Sep 10 08:39:00 UTC 2026 - [email protected] + +- merge gh#openSUSE/libstorage-ng#1095 +- removed redundant code +- 4.5.351 + +-------------------------------------------------------------------- +Thu Sep 10 07:08:58 UTC 2026 - [email protected] + +- merge gh#openSUSE/libstorage-ng#1094 +- add udevadm settle call before erasing encryption layer (bsc#1279918) +- 4.5.350 + +-------------------------------------------------------------------- +Wed Sep 9 15:01:03 UTC 2026 - [email protected] + +- merge gh#openSUSE/libstorage-ng#1093 +- provide specialized output functions for Environment class +- coding style +- 4.5.349 + +-------------------------------------------------------------------- +Thu Sep 3 12:47:44 UTC 2026 - [email protected] + +- Translated using Weblate (Danish) (bsc#1149754) +- 4.5.348 + +-------------------------------------------------------------------- +Thu Sep 3 09:42:58 UTC 2026 - [email protected] + +- merge gh#openSUSE/libstorage-ng#1092 +- removed set_ruby_logger workaround since AI found problems with + it +- 4.5.347 + +-------------------------------------------------------------------- +Wed Sep 2 15:55:16 UTC 2026 - [email protected] + +- merge gh#openSUSE/libstorage-ng#1091 +- added some function aliases +- coding style +- ignore generated file +- 4.5.346 + +-------------------------------------------------------------------- +Wed Sep 2 12:05:31 UTC 2026 - [email protected] + +- merge gh#openSUSE/libstorage-ng#1090 +- Fix SWIG 4.5.0 template instantiations and logger crashes (see + bsc#1275515). +- 4.5.345 + +-------------------------------------------------------------------- +Wed Sep 2 08:04:09 UTC 2026 - [email protected] + +- Translated using Weblate (Danish) (bsc#1149754) +- 4.5.344 + +-------------------------------------------------------------------- +Mon Aug 31 20:54:06 UTC 2026 - [email protected] + +- Translated using Weblate (Danish) (bsc#1149754) +- 4.5.343 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.5.342.tar.xz New: ---- libstorage-ng-4.5.352.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.woTG8Z/_old 2026-09-11 19:02:08.709653354 +0200 +++ /var/tmp/diff_new_pack.woTG8Z/_new 2026-09-11 19:02:08.711653437 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.5.342 +Version: 4.5.352 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.5.342.tar.xz -> libstorage-ng-4.5.352.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/LIBVERSION new/libstorage-ng-4.5.352/LIBVERSION --- old/libstorage-ng-4.5.342/LIBVERSION 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/LIBVERSION 2026-09-10 16:27:24.000000000 +0200 @@ -1 +1 @@ -1.105.0 +1.106.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/VERSION new/libstorage-ng-4.5.352/VERSION --- old/libstorage-ng-4.5.342/VERSION 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/VERSION 2026-09-10 16:27:24.000000000 +0200 @@ -1 +1 @@ -4.5.342 +4.5.352 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/bindings/python/examples/probe.py new/libstorage-ng-4.5.352/bindings/python/examples/probe.py --- old/libstorage-ng-4.5.342/bindings/python/examples/probe.py 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/bindings/python/examples/probe.py 2026-09-10 16:27:24.000000000 +0200 @@ -5,6 +5,8 @@ environment = Environment(True) +print(environment) + storage = Storage(environment) storage.probe() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/bindings/python/testsuite/logger.py new/libstorage-ng-4.5.352/bindings/python/testsuite/logger.py --- old/libstorage-ng-4.5.342/bindings/python/testsuite/logger.py 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/bindings/python/testsuite/logger.py 2026-09-10 16:27:24.000000000 +0200 @@ -34,6 +34,13 @@ self.assertTrue(my_logger_called) + # Unsetting the logger is needed if the destructor of Storage + # logs something. Otherwise MyLogger might (cleanup order is + # non-deterministic in Python) not be valid anymore at that + # time. + + set_logger(None) + if __name__ == '__main__': unittest.main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/bindings/ruby/Makefile.am new/libstorage-ng-4.5.352/bindings/ruby/Makefile.am --- old/libstorage-ng-4.5.342/bindings/ruby/Makefile.am 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/bindings/ruby/Makefile.am 2026-09-10 16:27:24.000000000 +0200 @@ -30,7 +30,7 @@ ${top_builddir}/storage/libstorage-ng.la storage_wrap.cxx: storage-ruby.i $(DEPENDENCIES) - swig -o storage_wrap.cxx -c++ -ruby -autorename ${AM_CPPFLAGS} storage-ruby.i + swig -o storage_wrap.cxx -c++ -ruby ${AM_CPPFLAGS} storage-ruby.i CLEANFILES = storage.so storage_wrap.cxx storage_wrap.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/bindings/ruby/examples/probe.rb new/libstorage-ng-4.5.352/bindings/ruby/examples/probe.rb --- old/libstorage-ng-4.5.342/bindings/ruby/examples/probe.rb 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/bindings/ruby/examples/probe.rb 2026-09-10 16:27:24.000000000 +0200 @@ -5,6 +5,8 @@ environment = Storage::Environment.new(true) +puts environment + storage = Storage::Storage.new(environment) storage.probe() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/bindings/ruby/testsuite/logger.rb new/libstorage-ng-4.5.352/bindings/ruby/testsuite/logger.rb --- old/libstorage-ng-4.5.342/bindings/ruby/testsuite/logger.rb 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/bindings/ruby/testsuite/logger.rb 2026-09-10 16:27:24.000000000 +0200 @@ -37,6 +37,12 @@ assert($my_logger_called) + # Unsetting the logger is needed if the destructor of Storage logs + # something. Otherwise MyLogger might (cleanup order is + # non-deterministic in Ruby) not be valid anymore at that time. + + Storage::logger = nil + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/bindings/storage.i new/libstorage-ng-4.5.352/bindings/storage.i --- old/libstorage-ng-4.5.342/bindings/storage.i 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/bindings/storage.i 2026-09-10 16:27:24.000000000 +0200 @@ -15,11 +15,13 @@ %typedef int pid_t; +use_ostream(storage::Environment); use_ostream(storage::Devicegraph); use_ostream(storage::Device); use_ostream(storage::Holder); use_ostream(storage::Region); use_ostream(storage::ResizeInfo); +use_ostream(storage::RemoveInfo); use_ostream(storage::ContentInfo); use_ostream(storage::SpaceInfo); use_ostream(storage::PartitionSlot); @@ -159,6 +161,7 @@ %include "../../storage/CompoundAction.h" %include "../../storage/Utils/Swig.h" + %include "../../storage/Utils/Logger.h" %include "../../storage/Utils/Exception.h" %include "../../storage/Utils/HumanString.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/doc/autodocs/html/.gitignore new/libstorage-ng-4.5.352/doc/autodocs/html/.gitignore --- old/libstorage-ng-4.5.342/doc/autodocs/html/.gitignore 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/doc/autodocs/html/.gitignore 2026-09-10 16:27:24.000000000 +0200 @@ -1,4 +1,5 @@ *.css +*.dot.cmapx *.gif *.html *.js diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/po/da.po new/libstorage-ng-4.5.352/po/da.po --- old/libstorage-ng-4.5.342/po/da.po 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/po/da.po 2026-09-10 16:27:24.000000000 +0200 @@ -7,7 +7,7 @@ "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-01-29 14:48+0100\n" -"PO-Revision-Date: 2026-06-10 16:12+0000\n" +"PO-Revision-Date: 2026-09-03 13:08+0000\n" "Last-Translator: Peter Andreasen <[email protected]>\n" "Language-Team: Danish <https://l10n.opensuse.org/projects/libstorage/ng-" "master/da/>\n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 2026.6.1\n" +"X-Generator: Weblate 2026.8.1\n" msgid "" "\n" @@ -35,9 +35,9 @@ #. TRANSLATORS: #. %1$s is replaced with the device name (e.g. /dev/sdc1), #. %2$s is replaced with the size (e.g. 60.00 GiB) -#, fuzzy, c-format +#, c-format msgid "%1$s (%2$s)" -msgstr "Udvid %1$s til %2$s" +msgstr "%1$s (%2$s)" #. TRANSLATORS: appended after list of value to indicate that some #. values have been omitted @@ -50,9 +50,9 @@ #. TRANSLATORS: used to construct list of values #. %1$s is replaced by first value #. %2$s is replaced by second value -#, fuzzy, c-format +#, c-format msgid "%1$s and %2$s" -msgstr "Udvid %1$s til %2$s" +msgstr "%1$s og %2$s" #. TRANSLATORS: #. %1$s is replaced with the bcache name (e.g. /dev/bcache0), @@ -65,56 +65,56 @@ #. TRANSLATORS: used to construct list of values #. %1$s is replaced by first value #. %2$s is replaced by second value -#, fuzzy, c-format +#, c-format msgid "%1$s, %2$s" -msgstr "Udvid %1$s til %2$s" +msgstr "%1$s, %2$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by device name (e.g. /dev/sda1) -#, fuzzy, c-format +#, c-format msgid "Activate encryption layer device on %1$s" -msgstr "Sæt krypteret løkkeenhed op på %1$s" +msgstr "Aktiver krypteringslag på %1$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by the device name (e.g. /dev/loop0), #. %2$s is replaced by the size (e.g. 20.00 GiB) -#, fuzzy, c-format +#, c-format msgid "Activate hard disk %1$s (%2$s)" -msgstr "Opret swap-diskområde %1$s (%2$s)" +msgstr "Aktiver harddisk %1$s (%2$s)" #. TRANSLATORS: displayed before action, #. %1$s is replaced by logical volume name (e.g. root), #. %2$s is replaced by size (e.g. 2.00 GiB), #. %3$s is replaced by volume group name (e.g. system) -#, fuzzy, c-format +#, c-format msgid "Activate logical volume %1$s (%2$s) on volume group %3$s" -msgstr "Opret logisk diskområde %1$s (%2$s) til %4$s med %3$s" +msgstr "Opret logisk volume %1$s (%2$s) på volume group %3$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by logical volume name (e.g. root), #. %2$s is replaced by size (e.g. 2.00 GiB), #. %3$s is replaced by volume group name (e.g. system) -#, fuzzy, c-format +#, c-format msgid "Activate thin logical volume %1$s (%2$s) on volume group %3$s" -msgstr "Formaterer logisk diskområde %1$s (%2$s) med %3$s" +msgstr "Aktivér logisk volume %1$s (%2$s) på volume-gruppe %3$s" #. TRANSLATORS: displayed before action, #. %1$s is replaced by logical volume name (e.g. root), #. %2$s is replaced by size (e.g. 2.00 GiB), #. %3$s is replaced by volume group name (e.g. system) -#, fuzzy, c-format +#, c-format msgid "Activate thin pool logical volume %1$s (%2$s) on volume group %3$s" -msgstr "Formaterer logisk diskområde %1$s (%2$s) med %3$s" +msgstr "Aktivér pool af logiske volume %1$s (%2$s) på volume-gruppe %3$s" #. TRANSLATORS: progress message -#, fuzzy, c-format +#, c-format msgid "Activating BitLocker %s" -msgstr "Opret multipath-partition %1$s (%2$s)" +msgstr "Aktiverer BitLocker %s" #. TRANSLATORS: error message -#, fuzzy, c-format +#, c-format msgid "Activating BitLocker %s failed" -msgstr "Opret multipath-partition %1$s (%2$s)" +msgstr "Aktivering af BitLocker %s mislykkedes" #. TRANSLATORS: progress message #, c-format @@ -258,19 +258,19 @@ #. %1$s is replaced by md name (e.g. /dev/md0) #, c-format msgid "Adding %1$s to /etc/mdadm.conf" -msgstr "" +msgstr "Tilføjer %1$s til /etc/mdadm.conf" #. TRANSLATORS: displayed during action, #. %1$s is replaced by device name (e.g. /dev/sda1) #, c-format msgid "Adding device %1$s to LVM devices file" -msgstr "" +msgstr "Tilføjer enheden %1$s til LVM-devices fil" #. TRANSLATORS: displayed during action, #. %1$s is replaced by device name (e.g. /dev/sda1) #, c-format msgid "Adding encryption layer device on %1$s to /etc/crypttab" -msgstr "" +msgstr "Tilføjer krypteringslag-enhed på %1$s til /etc/crypttab" #. TRANSLATORS: displayed during action, #. %1$s is replaced by the mount point (e.g. /home), @@ -3321,7 +3321,7 @@ #. TRANSLATORS: name of partition type msgid "Unknown" -msgstr "" +msgstr "Ukendt" #. TRANSLATORS: displayed before action, #. %1$s is replaced by one or more device names (e.g /dev/sda1 (1.00 GiB) @@ -3396,19 +3396,19 @@ #. TRANSLATORS: name of object msgid "VFAT" -msgstr "" +msgstr "VFAT" #. TRANSLATORS: name of partition type msgid "Windows Data Partition" -msgstr "" +msgstr "Windows-datapartition" #. TRANSLATORS: name of object msgid "XFS" -msgstr "" +msgstr "XFS" #. TRANSLATORS: name of a filesystem object in the storage devicegraph msgid "exFAT" -msgstr "" +msgstr "exFAT" #. TRANSLATORS: symbol for "kilo" (best keep untranslated) msgid "k" @@ -3419,8 +3419,9 @@ msgstr "kB" #. TRANSLATORS: name of object +#, fuzzy msgid "tmpfs" -msgstr "" +msgstr "tmpfs" #, fuzzy, c-format #~ msgid "Rename %1$s to %2$s" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/storage/Devices/BitlockerV2Impl.cc new/libstorage-ng-4.5.352/storage/Devices/BitlockerV2Impl.cc --- old/libstorage-ng-4.5.342/storage/Devices/BitlockerV2Impl.cc 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/storage/Devices/BitlockerV2Impl.cc 2026-09-10 16:27:24.000000000 +0200 @@ -479,6 +479,8 @@ SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "--", "erase", blk_device->get_name() }; + wait_for_devices({ blk_device }); + SystemCmd cmd(cmd_args, SystemCmd::DoThrow); // cryptsetup erase does not remove the signature, thus also use diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/storage/Devices/LuksImpl.cc new/libstorage-ng-4.5.352/storage/Devices/LuksImpl.cc --- old/libstorage-ng-4.5.342/storage/Devices/LuksImpl.cc 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/storage/Devices/LuksImpl.cc 2026-09-10 16:27:24.000000000 +0200 @@ -764,6 +764,8 @@ SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "--", "erase", blk_device->get_name() }; + wait_for_devices({ blk_device }); + SystemCmd cmd(cmd_args, SystemCmd::DoThrow); // cryptsetup erase does not remove the signature, thus also use diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/storage/Devices/PartitionImpl.cc new/libstorage-ng-4.5.352/storage/Devices/PartitionImpl.cc --- old/libstorage-ng-4.5.342/storage/Devices/PartitionImpl.cc 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/storage/Devices/PartitionImpl.cc 2026-09-10 16:27:24.000000000 +0200 @@ -1147,8 +1147,6 @@ SystemCmd::Args cmd_args = { PARTED_BIN, "--script", partitionable->get_name(), "unit", "s", "resizepart", to_string(get_number()), to_string(get_region().get_end()) }; - udev_settle(); - wait_for_devices({ get_non_impl() }); SystemCmd cmd(cmd_args, SystemCmd::DoThrow); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/storage/EtcCrypttab.cc new/libstorage-ng-4.5.352/storage/EtcCrypttab.cc --- old/libstorage-ng-4.5.342/storage/EtcCrypttab.cc 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/storage/EtcCrypttab.cc 2026-09-10 16:27:24.000000000 +0200 @@ -81,7 +81,6 @@ CrypttabEntry::CrypttabEntry() { - } @@ -90,13 +89,11 @@ crypt_device( crypt_device ), block_device( block_device ) { - } CrypttabEntry::~CrypttabEntry() { - } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/storage/Utils/Exception.cc new/libstorage-ng-4.5.352/storage/Utils/Exception.cc --- old/libstorage-ng-4.5.342/storage/Utils/Exception.cc 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/storage/Utils/Exception.cc 2026-09-10 16:27:24.000000000 +0200 @@ -1,5 +1,6 @@ /* * Copyright (c) [2014-2015] Novell, Inc. + * Copyright (c) 2026 SUSE LLC * * All Rights Reserved. * @@ -25,8 +26,8 @@ */ -#include <stdio.h> -#include <string.h> +#include <cstdio> +#include <cstring> #include <sstream> #include "storage/Utils/Exception.h" @@ -37,8 +38,8 @@ namespace storage { - std::string - CodeLocation::asString() const + string + CodeLocation::as_string() const { // Format as "MySource.cc(myFunc):177" std::string str( _file ); @@ -48,10 +49,17 @@ } + string + CodeLocation::asString() const + { + return as_string(); + } + + std::ostream & operator<<( std::ostream & str, const CodeLocation & obj ) { - return str << obj.asString(); + return str << obj.as_string(); } @@ -75,8 +83,8 @@ } - std::string - Exception::asString() const + string + Exception::as_string() const { std::ostringstream str; dumpOn( str ); @@ -84,6 +92,13 @@ } + string + Exception::asString() const + { + return as_string(); + } + + std::ostream & Exception::dumpOn( std::ostream & str ) const { @@ -128,7 +143,7 @@ location.file().c_str(), location.line(), location.func().c_str(), - prefix << " " << exception.asString() ); + prefix << " " << exception.as_string() ); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.342/storage/Utils/Exception.h new/libstorage-ng-4.5.352/storage/Utils/Exception.h --- old/libstorage-ng-4.5.342/storage/Utils/Exception.h 2026-08-22 22:13:24.000000000 +0200 +++ new/libstorage-ng-4.5.352/storage/Utils/Exception.h 2026-09-10 16:27:24.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2014-2015] Novell, Inc. - * Copyright (c) [2016-2018] SUSE LLC + * Copyright (c) [2016-2026] SUSE LLC * * All Rights Reserved. * @@ -35,6 +35,7 @@ #include <ostream> #include "storage/Utils/Logger.h" +#include "storage/Utils/Swig.h" namespace storage @@ -47,6 +48,7 @@ class CodeLocation { public: + /** * Constructor. * Commonly called using the ST_EXCEPTION_CODE_LOCATION macro. @@ -82,7 +84,9 @@ /** * Returns the location in normalized string format. **/ - std::string asString() const; + std::string as_string() const; + + std::string asString() const ST_DEPRECATED; /** * Stream output @@ -90,11 +94,12 @@ friend std::ostream & operator<<( std::ostream & str, const CodeLocation & obj ); private: + std::string _file; std::string _func; int _line; - }; // CodeLocation + }; /** @@ -113,6 +118,7 @@ class Exception : public std::exception { public: + /** * Default constructor. * Use ST_THROW to throw exceptions. @@ -145,7 +151,7 @@ /** * Return the message string provided to the constructor. * Note: This is not necessarily the complete error message. - * The whole error message is provided by asString or dumpOn. + * The whole error message is provided by as_string or dumpOn. **/ const std::string& msg() const { return _msg; } @@ -162,7 +168,9 @@ /** * Error message provided by dumpOn as string. **/ - std::string asString() const; + std::string as_string() const; + + std::string asString() const ST_DEPRECATED; /** * Make a string from errno_r. @@ -196,10 +204,9 @@ **/ virtual std::ostream& dumpOn(std::ostream& str) const; - private: - friend std::ostream& operator<<(std::ostream& str, const Exception& obj); + friend std::ostream& operator<<(std::ostream& str, const Exception& obj); mutable CodeLocation _where; std::string _msg; @@ -211,7 +218,7 @@ **/ std::ostream & dumpError( std::ostream & str ) const; - }; // class Exception + }; /** @@ -227,12 +234,14 @@ class NullPointerException : public Exception { public: + NullPointerException() : Exception("Null pointer", LogLevel::ERROR) {} virtual ~NullPointerException() noexcept {} + }; @@ -243,8 +252,10 @@ class UnsupportedException : public Exception { public: + UnsupportedException(const std::string& msg) : Exception(msg) {} virtual ~UnsupportedException() noexcept {} + }; @@ -255,8 +266,10 @@ class LogicException : public Exception { public: + LogicException(const std::string& msg) : Exception(msg) {} virtual ~LogicException() noexcept {} + }; @@ -267,6 +280,7 @@ class OutOfMemoryException : public Exception { public: + OutOfMemoryException() : Exception("Out of memory", LogLevel::ERROR) {} @@ -283,6 +297,7 @@ class IndexOutOfRangeException : public Exception { public: + /** * Constructor. * @@ -307,17 +322,23 @@ /** * Return the offending index value. **/ - int invalidIndex() const { return _invalidIndex; } + int invalid_index() const { return _invalidIndex; } + + int invalidIndex() const ST_DEPRECATED { return _invalidIndex; } /** * Return the valid minimum index. **/ - int validMin() const { return _validMin; } + int valid_min() const { return _validMin; } + + int validMin() const ST_DEPRECATED { return _validMin; } /** * Return the valid maximum index. **/ - int validMax() const { return _validMax; } + int valid_max() const { return _validMax; } + + int validMax() const ST_DEPRECATED { return _validMax; } protected: @@ -342,6 +363,7 @@ int _invalidIndex; int _validMin; int _validMax; + }; @@ -431,6 +453,7 @@ std::string _seen; std::string _expected; + };
