Merge ~sergiodj/ubuntu/+source/nut:fix-ftbfs-gcc-11 into ubuntu/+source/nut:ubuntu/devel

Proposed by Sergio Durigan Junior
Status: Merged
Approved by: Sergio Durigan Junior
Approved revision: 9104363279602e6778b134572033b9179a197d21
Merged at revision: 9104363279602e6778b134572033b9179a197d21
Proposed branch: ~sergiodj/ubuntu/+source/nut:fix-ftbfs-gcc-11
Merge into: ubuntu/+source/nut:ubuntu/devel
Diff against target: 1012 lines (+990/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/Remove-dynamic-exception-specifications-from-clients.patch (+981/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Approve
Utkarsh Gupta (community) Needs Information
Review via email: mp+407043@code.launchpad.net

Description of the change

This MP fixes the FTBFS that happens when compiling nut with GCC 11.

GCC 11 defaults to C++17, which doesn't allow dynamic exception specifications anymore. This is the reason for the build failure.

Upstream has already fixed the issue:

https://github.com/networkupstools/nut/commit/fab323320d5b955ed034b2eea390a9bbb549e8e5

The patch is big and required manual adjustments, but it makes the package compile again. Bear in mind that nut is in a sad state and there are a lot of warnings when building the package.

There's a PPA with the proposed change (built using GCC 11) here:

https://launchpad.net/~sergiodj/+archive/ubuntu/ftbfs-impish/+packages

To post a comment you must log in.
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :
Download full text (28.8 KiB)

Hey,

On a quick look:
-> indeed, as you say, there are lots of warnings, et al. But well, it's okay.

-> build-time tests aren't being run, why? :(
```
============================================================================
Testsuite summary for nut 2.7.4
============================================================================
# TOTAL: 0
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
```

-> there seem to be a symbols mismatch:
```
dpkg-gensymbols: warning: debian/libnutclient0/DEBIAN/symbols doesn't match completely debian/libnutclient0.symbols
--- debian/libnutclient0.symbols (libnutclient0_2.7.4-13ubuntu5_amd64)
+++ dpkg-gensymbolsXa6vj0 2021-08-12 20:05:50.329104861 +0000
@@ -50,16 +50,16 @@
  (c++)"nut::Device::setVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
  (c++)"nut::Device::setVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)@Base" 2.7.3
  (c++)"nut::Device::~Device()@Base" 2.7.3
- (c++|optional=lto)"nut::IOException::~IOException()@Base" 2.7.3
- (c++|optional=lto)"nut::NotConnectedException::NotConnectedException()@Base" 2.7.3
- (c++|optional=lto)"nut::NotConnectedException::~NotConnectedException()@Base" 2.7.3
- (c++|optional=lto)"nut::NutException::NutException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
- (c++|optional=lto)"nut::NutException::str[abi:cxx11]() const@Base" 2.7.3
- (c++|optional=lto)"nut::NutException::what() const@Base" 2.7.3
- (c++|optional=lto)"nut::NutException::~NutException()@Base" 2.7.3
+#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::IOException::~IOException()@Base" 2.7.3
+#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::NotConnectedException::NotConnectedException()@Base" 2.7.3
+#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::NotConnectedException::~NotConnectedException()@Base" 2.7.3
+#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::NutException::NutException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
+#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::NutException::str[abi:cxx11]() const@Base" 2.7.3
+#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::NutException::what() const@Base" 2.7.3
+#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::NutException::~NutException()@Base" 2.7.3
  (c++)"nut::SystemException::SystemException()@Base" 2.7.3
  (c++)"nut::SystemException::err[abi:cxx11]()@Base" 2.7.3
- (c++|optional=lto)"nut::SystemException::~SystemException()@Base" 2.7.3
+#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::SystemException::~SystemException()@Base" 2.7.3
  (c++)"nut::TcpClient::TcpClient()@Base" 2.7.3
  (c++)"nut::TcpClient::TcpClient(std::__cxx11::basic_string<char, std::c...

review: Needs Information
Revision history for this message
Bryce Harrington (bryce) wrote :

* Changelog:
  - [√] old content and logical tag match as expected
  - [√] changelog entry correct version and targeted codename
  - [√] changelog entries correct
  - [√] update-maintainer has been run

* Actual changes:
  - [√] no upstream changes to consider
  - [√] no further upstream version to consider
  - [√] debian changes look safe

* Old Delta:
  - [-] dropped changes are ok to be dropped
  - [-] nothing else to drop
  - [-] changes forwarded upstream/debian (if appropriate)

* New Delta:
  - [-] no new patches added
  - [√] patches match what was proposed upstream
  - [√] patches correctly included in debian/patches/series
  - [√] patches have correct DEP3 metadata

* Build/Test:
  - [√] build is ok
  - [-] verified PPA package installs/uninstalls
  - [√] autopkgtest against the PPA package passes
  - [-] sanity checks test fine

I'm curious why the new patch is numbered 0012 since there already is a different patch 0012 (and 0013), so seems like this should should be 0014. Fwiw, when Debian numbers their patches, I sometimes deliberately don't number the ubuntu ones; figure it distinguishes them and is less likely to get confused in future merges as the Debian patches change. However, patch naming is entirely personal preference.

Everything else LGTM. The PPA package hasn't published but it's built successfully on all arches.

I ran the testsuite but get weird errors about test dependencies:
autopkgtest [03:52:23]: @@@@@@@@@@@@@@@@@@@@ summary
nut FAIL badpkg
blame: ./nut_2.7.4-13ubuntu5.dsc
badpkg: Test dependencies are unsatisfiable. A common reason is that your testbed is out of date with respect to the archive, and you need to use a current testbed or run apt-get update or use -U.

review: Approve
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :
Download full text (31.2 KiB)

On Friday, August 13 2021, Utkarsh Gupta wrote:

> Hey,

Thanks for the review.

Bear in mind that the issues you raised are orthogonal to the FTBFS fix,
although they are of course valid.

> -> build-time tests aren't being run, why? :(
> ```
> ============================================================================
> Testsuite summary for nut 2.7.4
> ============================================================================
> # TOTAL: 0
> # PASS: 0
> # SKIP: 0
> # XFAIL: 0
> # FAIL: 0
> # XPASS: 0
> # ERROR: 0
> ============================================================================
> ```

I don't know offhand. As you can see from the logs "make check" is
being properly invoked by the dh_auto_test target, and "make" is
traversing the tree and calling "check" on the subdirs as expected, but
for some reason all of them return with "Nothing to be done for
'check'."

Looking into the "tests/" directory, we can see that there's not much
there. I did find what looks like to be valid tests inside
scripts/augeas/tests/test_nut.aug, but I don't know how they're supposed
to be run.

I checked that the same problem obviously happens on Debian, and I
verified that the Fedora nut package doesn't run its tests during build
time either. The next step would be to build a pristine upstream
checkout and verify what happens there, I guess.

> -> there seem to be a symbols mismatch:
> ```
> dpkg-gensymbols: warning: debian/libnutclient0/DEBIAN/symbols doesn't match completely debian/libnutclient0.symbols
> --- debian/libnutclient0.symbols (libnutclient0_2.7.4-13ubuntu5_amd64)
> +++ dpkg-gensymbolsXa6vj0 2021-08-12 20:05:50.329104861 +0000
> @@ -50,16 +50,16 @@
> (c++)"nut::Device::setVariable(std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&,
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> > const&)@Base" 2.7.3
> (c++)"nut::Device::setVariable(std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&,
> std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >,
> std::allocator<std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > > > const&)@Base" 2.7.3
> (c++)"nut::Device::~Device()@Base" 2.7.3
> - (c++|optional=lto)"nut::IOException::~IOException()@Base" 2.7.3
> - (c++|optional=lto)"nut::NotConnectedException::NotConnectedException()@Base" 2.7.3
> - (c++|optional=lto)"nut::NotConnectedException::~NotConnectedException()@Base" 2.7.3
> - (c++|optional=lto)"nut::NutException::NutException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 2.7.3
> - (c++|optional=lto)"nut::NutException::str[abi:cxx11]() const@Base" 2.7.3
> - (c++|optional=lto)"nut::NutException::what() const@Base" 2.7.3
> - (c++|optional=lto)"nut::NutException::~NutException()@Base" 2.7.3
> +#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::IOException::~IOException()@Base" 2.7.3
> +#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::NotConnectedException::NotConnectedException()@Base" 2.7.3
> +#MISSING: 2.7.4-13ubuntu5# (c++|optional=lto)"nut::NotConnectedExceptio...

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Friday, August 13 2021, Bryce Harrington wrote:

> Review: Approve

Thanks for the review.

> I'm curious why the new patch is numbered 0012 since there already is
> a different patch 0012 (and 0013), so seems like this should should be
> 0014. Fwiw, when Debian numbers their patches, I sometimes
> deliberately don't number the ubuntu ones; figure it distinguishes
> them and is less likely to get confused in future merges as the Debian
> patches change. However, patch naming is entirely personal
> preference.

Hm. I use "gbp pq" to manage patches (even with Ubuntu packages, which
don't use gbp), and I think that was a problem with how gbp calculated
this patch's number. That's a good point and I will manually rename it.

> I ran the testsuite but get weird errors about test dependencies:
> autopkgtest [03:52:23]: @@@@@@@@@@@@@@@@@@@@ summary
> nut FAIL badpkg
> blame: ./nut_2.7.4-13ubuntu5.dsc
> badpkg: Test dependencies are unsatisfiable. A common reason is that
> your testbed is out of date with respect to the archive, and you need
> to use a current testbed or run apt-get update or use -U.

Yeah, that was happening with me when I was running the tests using
schroot/lxd as the backend. When I switched to qemu (and enabled the
proposed pocket), the tests succeeded:

autopkgtest [16:12:52]: @@@@@@@@@@@@@@@@@@@@ summary
nut PASS

Anyway, thanks again. I will rename the patch, force-push the branch
and upload the package.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Friday, August 13 2021, Sergio Durigan Junior wrote:

> On Friday, August 13 2021, Utkarsh Gupta wrote:
>
>> -> build-time tests aren't being run, why? :(
>> ```
>> ============================================================================
>> Testsuite summary for nut 2.7.4
>> ============================================================================
>> # TOTAL: 0
>> # PASS: 0
>> # SKIP: 0
>> # XFAIL: 0
>> # FAIL: 0
>> # XPASS: 0
>> # ERROR: 0
>> ============================================================================
>> ```
>
> I don't know offhand. As you can see from the logs "make check" is
> being properly invoked by the dh_auto_test target, and "make" is
> traversing the tree and calling "check" on the subdirs as expected, but
> for some reason all of them return with "Nothing to be done for
> 'check'."
>
> Looking into the "tests/" directory, we can see that there's not much
> there. I did find what looks like to be valid tests inside
> scripts/augeas/tests/test_nut.aug, but I don't know how they're supposed
> to be run.
>
> I checked that the same problem obviously happens on Debian, and I
> verified that the Fedora nut package doesn't run its tests during build
> time either. The next step would be to build a pristine upstream
> checkout and verify what happens there, I guess.

A few more interesting bits regarding this topic:

While looking at the dep8 tests from nut, I noticed that they were added
by the following commit (from Debian):

  commit f313323738fd5bf05cd49c0b80b1f21783e8602b
  Author: Laurent Bigonville <email address hidden>
  AuthorDate: Tue Jun 18 21:52:31 2013 +0200
  Commit: Laurent Bigonville <email address hidden>
  CommitDate: Tue Jun 18 21:52:31 2013 +0200

      Added dep-8-tests to improve QA (from Ubuntu, closes: #708130)

If we take a look at the actual tests inside d/t/, we can see that
there's a custom "d/t/test-nut.py", which came from Ubuntu. The file
looks a lot like what we have in the ~qa-regression-testing repository,
and I bet that's where it came from.

This all contributes to the theory that upstream doesn't have a very
comprehensive testsuite and for that reason we had to come up with our
own test script that were later incorporated into the official package.

Cheers,

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Uploaded:

$ git push pkg upload/2.7.4-13ubuntu5
Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 8 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 6.70 KiB | 1.34 MiB/s, done.
Total 11 (delta 7), reused 0 (delta 0)
remote: Checking connectivity: 11, done.
To ssh://git.launchpad.net/ubuntu/+source/nut
 * [new tag] upload/2.7.4-13ubuntu5 -> upload/2.7.4-13ubuntu5

$ dput nut_2.7.4-13ubuntu5_source.changes
Trying to upload package to ubuntu
Checking signature on .changes
gpg: /home/sergio/work/nut/nut_2.7.4-13ubuntu5_source.changes: Valid signature from 106DA1C8C3CBBF14
Checking signature on .dsc
gpg: /home/sergio/work/nut/nut_2.7.4-13ubuntu5.dsc: Valid signature from 106DA1C8C3CBBF14
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading nut_2.7.4-13ubuntu5.dsc: done.
  Uploading nut_2.7.4-13ubuntu5.debian.tar.xz: done.
  Uploading nut_2.7.4-13ubuntu5_source.buildinfo: done.
  Uploading nut_2.7.4-13ubuntu5_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index a79c717..ac54bcd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
1nut (2.7.4-13ubuntu5) impish; urgency=medium
2
3 * d/p/Remove-dynamic-exception-specifications-from-clients.patch:
4 Fix FTBFS with GCC 11 due to C++17 not allowing dynamic exception
5 specifications anymore. (LP: #1939744)
6
7 -- Sergio Durigan Junior <sergio.durigan@canonical.com> Thu, 12 Aug 2021 15:51:12 -0400
8
1nut (2.7.4-13ubuntu4) hirsute; urgency=medium9nut (2.7.4-13ubuntu4) hirsute; urgency=medium
210
3 * Mark symbols as optional not seen when building with lto.11 * Mark symbols as optional not seen when building with lto.
diff --git a/debian/patches/Remove-dynamic-exception-specifications-from-clients.patch b/debian/patches/Remove-dynamic-exception-specifications-from-clients.patch
4new file mode 10064412new file mode 100644
index 0000000..d0ce293
--- /dev/null
+++ b/debian/patches/Remove-dynamic-exception-specifications-from-clients.patch
@@ -0,0 +1,981 @@
1From: Peter Klein <kleinpa00@gmail.com>
2Date: Thu, 11 Jun 2020 02:32:13 +0000
3Subject: Remove dynamic exception specifications from clients/nutclient.cpp
4
5These are invalid in c++17 and must be removed for compatibility with
6modern compilers.
7
8Origin: backport, https://github.com/networkupstools/nut/commit/fab323320d5b955ed034b2eea390a9bbb549e8e5
9Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nut/+bug/1939744
10Reviewed-By: Sergio Durigan Junior <sergiodj@ubuntu.com>
11---
12 clients/nutclient.cpp | 128 ++++++++++++++++++-------------------
13 clients/nutclient.h | 170 +++++++++++++++++++++++++-------------------------
14 2 files changed, 146 insertions(+), 152 deletions(-)
15
16diff --git a/clients/nutclient.cpp b/clients/nutclient.cpp
17index 8304473..a6004ab 100644
18--- a/clients/nutclient.cpp
19+++ b/clients/nutclient.cpp
20@@ -96,18 +96,18 @@ class Socket
21 public:
22 Socket();
23
24- void connect(const std::string& host, int port)throw(nut::IOException);
25+ void connect(const std::string& host, int port);
26 void disconnect();
27 bool isConnected()const;
28
29 void setTimeout(long timeout);
30 bool hasTimeout()const{return _tv.tv_sec>=0;}
31
32- size_t read(void* buf, size_t sz)throw(nut::IOException);
33- size_t write(const void* buf, size_t sz)throw(nut::IOException);
34+ size_t read(void* buf, size_t sz);
35+ size_t write(const void* buf, size_t sz);
36
37- std::string read()throw(nut::IOException);
38- void write(const std::string& str)throw(nut::IOException);
39+ std::string read();
40+ void write(const std::string& str);
41
42
43 private:
44@@ -129,7 +129,7 @@ void Socket::setTimeout(long timeout)
45 _tv.tv_sec = timeout;
46 }
47
48-void Socket::connect(const std::string& host, int port)throw(nut::IOException)
49+void Socket::connect(const std::string& host, int port)
50 {
51 int sock_fd;
52 struct addrinfo hints, *res, *ai;
53@@ -298,7 +298,7 @@ bool Socket::isConnected()const
54 return _sock!=INVALID_SOCKET;
55 }
56
57-size_t Socket::read(void* buf, size_t sz)throw(nut::IOException)
58+size_t Socket::read(void* buf, size_t sz)
59 {
60 if(!isConnected())
61 {
62@@ -325,7 +325,7 @@ size_t Socket::read(void* buf, size_t sz)throw(nut::IOException)
63 return (size_t) res;
64 }
65
66-size_t Socket::write(const void* buf, size_t sz)throw(nut::IOException)
67+size_t Socket::write(const void* buf, size_t sz)
68 {
69 if(!isConnected())
70 {
71@@ -352,7 +352,7 @@ size_t Socket::write(const void* buf, size_t sz)throw(nut::IOException)
72 return (size_t) res;
73 }
74
75-std::string Socket::read()throw(nut::IOException)
76+std::string Socket::read()
77 {
78 std::string res;
79 char buff[256];
80@@ -383,7 +383,7 @@ std::string Socket::read()throw(nut::IOException)
81 }
82 }
83
84-void Socket::write(const std::string& str)throw(nut::IOException)
85+void Socket::write(const std::string& str)
86 {
87 // write(str.c_str(), str.size());
88 // write("\n", 1);
89@@ -408,13 +408,13 @@ Client::~Client()
90 {
91 }
92
93-bool Client::hasDevice(const std::string& dev)throw(NutException)
94+bool Client::hasDevice(const std::string& dev)
95 {
96 std::set<std::string> devs = getDeviceNames();
97 return devs.find(dev) != devs.end();
98 }
99
100-Device Client::getDevice(const std::string& name)throw(NutException)
101+Device Client::getDevice(const std::string& name)
102 {
103 if(hasDevice(name))
104 return Device(this, name);
105@@ -422,7 +422,7 @@ Device Client::getDevice(const std::string& name)throw(NutException)
106 return Device(NULL, "");
107 }
108
109-std::set<Device> Client::getDevices()throw(NutException)
110+std::set<Device> Client::getDevices()
111 {
112 std::set<Device> res;
113
114@@ -435,13 +435,13 @@ std::set<Device> Client::getDevices()throw(NutException)
115 return res;
116 }
117
118-bool Client::hasDeviceVariable(const std::string& dev, const std::string& name)throw(NutException)
119+bool Client::hasDeviceVariable(const std::string& dev, const std::string& name)
120 {
121 std::set<std::string> names = getDeviceVariableNames(dev);
122 return names.find(name) != names.end();
123 }
124
125-std::map<std::string,std::vector<std::string> > Client::getDeviceVariableValues(const std::string& dev)throw(NutException)
126+std::map<std::string,std::vector<std::string> > Client::getDeviceVariableValues(const std::string& dev)
127 {
128 std::map<std::string,std::vector<std::string> > res;
129
130@@ -455,7 +455,7 @@ std::map<std::string,std::vector<std::string> > Client::getDeviceVariableValues(
131 return res;
132 }
133
134-bool Client::hasDeviceCommand(const std::string& dev, const std::string& name)throw(NutException)
135+bool Client::hasDeviceCommand(const std::string& dev, const std::string& name)
136 {
137 std::set<std::string> names = getDeviceCommandNames(dev);
138 return names.find(name) != names.end();
139@@ -477,7 +477,7 @@ _socket(new internal::Socket)
140 // Do not connect now
141 }
142
143-TcpClient::TcpClient(const std::string& host, int port)throw(IOException):
144+TcpClient::TcpClient(const std::string& host, int port):
145 Client(),
146 _socket(new internal::Socket)
147 {
148@@ -489,14 +489,14 @@ TcpClient::~TcpClient()
149 delete _socket;
150 }
151
152-void TcpClient::connect(const std::string& host, int port)throw(IOException)
153+void TcpClient::connect(const std::string& host, int port)
154 {
155 _host = host;
156 _port = port;
157 connect();
158 }
159
160-void TcpClient::connect()throw(nut::IOException)
161+void TcpClient::connect()
162 {
163 _socket->connect(_host, _port);
164 }
165@@ -532,19 +532,18 @@ long TcpClient::getTimeout()const
166 }
167
168 void TcpClient::authenticate(const std::string& user, const std::string& passwd)
169- throw(NutException)
170 {
171 detectError(sendQuery("USERNAME " + user));
172 detectError(sendQuery("PASSWORD " + passwd));
173 }
174
175-void TcpClient::logout()throw(NutException)
176+void TcpClient::logout()
177 {
178 detectError(sendQuery("LOGOUT"));
179 _socket->disconnect();
180 }
181
182-Device TcpClient::getDevice(const std::string& name)throw(NutException)
183+Device TcpClient::getDevice(const std::string& name)
184 {
185 try
186 {
187@@ -560,7 +559,7 @@ Device TcpClient::getDevice(const std::string& name)throw(NutException)
188 return Device(this, name);
189 }
190
191-std::set<std::string> TcpClient::getDeviceNames()throw(NutException)
192+std::set<std::string> TcpClient::getDeviceNames()
193 {
194 std::set<std::string> res;
195
196@@ -576,12 +575,12 @@ std::set<std::string> TcpClient::getDeviceNames()throw(NutException)
197 return res;
198 }
199
200-std::string TcpClient::getDeviceDescription(const std::string& name)throw(NutException)
201+std::string TcpClient::getDeviceDescription(const std::string& name)
202 {
203 return get("UPSDESC", name)[0];
204 }
205
206-std::set<std::string> TcpClient::getDeviceVariableNames(const std::string& dev)throw(NutException)
207+std::set<std::string> TcpClient::getDeviceVariableNames(const std::string& dev)
208 {
209 std::set<std::string> set;
210
211@@ -594,7 +593,7 @@ std::set<std::string> TcpClient::getDeviceVariableNames(const std::string& dev)t
212 return set;
213 }
214
215-std::set<std::string> TcpClient::getDeviceRWVariableNames(const std::string& dev)throw(NutException)
216+std::set<std::string> TcpClient::getDeviceRWVariableNames(const std::string& dev)
217 {
218 std::set<std::string> set;
219
220@@ -607,17 +606,17 @@ std::set<std::string> TcpClient::getDeviceRWVariableNames(const std::string& dev
221 return set;
222 }
223
224-std::string TcpClient::getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException)
225+std::string TcpClient::getDeviceVariableDescription(const std::string& dev, const std::string& name)
226 {
227 return get("DESC", dev + " " + name)[0];
228 }
229
230-std::vector<std::string> TcpClient::getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException)
231+std::vector<std::string> TcpClient::getDeviceVariableValue(const std::string& dev, const std::string& name)
232 {
233 return get("VAR", dev + " " + name);
234 }
235
236-std::map<std::string,std::vector<std::string> > TcpClient::getDeviceVariableValues(const std::string& dev)throw(NutException)
237+std::map<std::string,std::vector<std::string> > TcpClient::getDeviceVariableValues(const std::string& dev)
238 {
239
240 std::map<std::string,std::vector<std::string> > map;
241@@ -634,13 +633,13 @@ std::map<std::string,std::vector<std::string> > TcpClient::getDeviceVariableValu
242 return map;
243 }
244
245-void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException)
246+void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)
247 {
248 std::string query = "SET VAR " + dev + " " + name + " " + escape(value);
249 detectError(sendQuery(query));
250 }
251
252-void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values)throw(NutException)
253+void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values)
254 {
255 std::string query = "SET VAR " + dev + " " + name;
256 for(size_t n=0; n<values.size(); ++n)
257@@ -650,7 +649,7 @@ void TcpClient::setDeviceVariable(const std::string& dev, const std::string& nam
258 detectError(sendQuery(query));
259 }
260
261-std::set<std::string> TcpClient::getDeviceCommandNames(const std::string& dev)throw(NutException)
262+std::set<std::string> TcpClient::getDeviceCommandNames(const std::string& dev)
263 {
264 std::set<std::string> cmds;
265
266@@ -663,32 +662,32 @@ std::set<std::string> TcpClient::getDeviceCommandNames(const std::string& dev)th
267 return cmds;
268 }
269
270-std::string TcpClient::getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException)
271+std::string TcpClient::getDeviceCommandDescription(const std::string& dev, const std::string& name)
272 {
273 return get("CMDDESC", dev + " " + name)[0];
274 }
275
276-void TcpClient::executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException)
277+void TcpClient::executeDeviceCommand(const std::string& dev, const std::string& name)
278 {
279 detectError(sendQuery("INSTCMD " + dev + " " + name));
280 }
281
282-void TcpClient::deviceLogin(const std::string& dev)throw(NutException)
283+void TcpClient::deviceLogin(const std::string& dev)
284 {
285 detectError(sendQuery("LOGIN " + dev));
286 }
287
288-void TcpClient::deviceMaster(const std::string& dev)throw(NutException)
289+void TcpClient::deviceMaster(const std::string& dev)
290 {
291 detectError(sendQuery("MASTER " + dev));
292 }
293
294-void TcpClient::deviceForcedShutdown(const std::string& dev)throw(NutException)
295+void TcpClient::deviceForcedShutdown(const std::string& dev)
296 {
297 detectError(sendQuery("FSD " + dev));
298 }
299
300-int TcpClient::deviceGetNumLogins(const std::string& dev)throw(NutException)
301+int TcpClient::deviceGetNumLogins(const std::string& dev)
302 {
303 std::string num = get("NUMLOGINS", dev)[0];
304 return atoi(num.c_str());
305@@ -696,7 +695,7 @@ int TcpClient::deviceGetNumLogins(const std::string& dev)throw(NutException)
306
307
308 std::vector<std::string> TcpClient::get
309- (const std::string& subcmd, const std::string& params) throw(NutException)
310+ (const std::string& subcmd, const std::string& params)
311 {
312 std::string req = subcmd;
313 if(!params.empty())
314@@ -714,7 +713,7 @@ std::vector<std::string> TcpClient::get
315 }
316
317 std::vector<std::vector<std::string> > TcpClient::list
318- (const std::string& subcmd, const std::string& params) throw(NutException)
319+ (const std::string& subcmd, const std::string& params)
320 {
321 std::string req = subcmd;
322 if(!params.empty())
323@@ -748,13 +747,13 @@ std::vector<std::vector<std::string> > TcpClient::list
324 }
325 }
326
327-std::string TcpClient::sendQuery(const std::string& req)throw(IOException)
328+std::string TcpClient::sendQuery(const std::string& req)
329 {
330 _socket->write(req);
331 return _socket->read();
332 }
333
334-void TcpClient::detectError(const std::string& req)throw(NutException)
335+void TcpClient::detectError(const std::string& req)
336 {
337 if(req.substr(0,3)=="ERR")
338 {
339@@ -954,47 +953,44 @@ bool Device::operator<(const Device& dev)const
340 return getName()<dev.getName();
341 }
342
343-std::string Device::getDescription()throw(NutException)
344+std::string Device::getDescription()
345 {
346 return getClient()->getDeviceDescription(getName());
347 }
348
349 std::vector<std::string> Device::getVariableValue(const std::string& name)
350- throw(NutException)
351 {
352 return getClient()->getDeviceVariableValue(getName(), name);
353 }
354
355 std::map<std::string,std::vector<std::string> > Device::getVariableValues()
356- throw(NutException)
357 {
358 return getClient()->getDeviceVariableValues(getName());
359 }
360
361-std::set<std::string> Device::getVariableNames()throw(NutException)
362+std::set<std::string> Device::getVariableNames()
363 {
364 return getClient()->getDeviceVariableNames(getName());
365 }
366
367-std::set<std::string> Device::getRWVariableNames()throw(NutException)
368+std::set<std::string> Device::getRWVariableNames()
369 {
370 return getClient()->getDeviceRWVariableNames(getName());
371 }
372
373-void Device::setVariable(const std::string& name, const std::string& value)throw(NutException)
374+void Device::setVariable(const std::string& name, const std::string& value)
375 {
376 getClient()->setDeviceVariable(getName(), name, value);
377 }
378
379 void Device::setVariable(const std::string& name, const std::vector<std::string>& values)
380- throw(NutException)
381 {
382 getClient()->setDeviceVariable(getName(), name, values);
383 }
384
385
386
387-Variable Device::getVariable(const std::string& name)throw(NutException)
388+Variable Device::getVariable(const std::string& name)
389 {
390 if(getClient()->hasDeviceVariable(getName(), name))
391 return Variable(this, name);
392@@ -1002,7 +998,7 @@ Variable Device::getVariable(const std::string& name)throw(NutException)
393 return Variable(NULL, "");
394 }
395
396-std::set<Variable> Device::getVariables()throw(NutException)
397+std::set<Variable> Device::getVariables()
398 {
399 std::set<Variable> set;
400
401@@ -1015,7 +1011,7 @@ std::set<Variable> Device::getVariables()throw(NutException)
402 return set;
403 }
404
405-std::set<Variable> Device::getRWVariables()throw(NutException)
406+std::set<Variable> Device::getRWVariables()
407 {
408 std::set<Variable> set;
409
410@@ -1028,12 +1024,12 @@ std::set<Variable> Device::getRWVariables()throw(NutException)
411 return set;
412 }
413
414-std::set<std::string> Device::getCommandNames()throw(NutException)
415+std::set<std::string> Device::getCommandNames()
416 {
417 return getClient()->getDeviceCommandNames(getName());
418 }
419
420-std::set<Command> Device::getCommands()throw(NutException)
421+std::set<Command> Device::getCommands()
422 {
423 std::set<Command> cmds;
424
425@@ -1046,7 +1042,7 @@ std::set<Command> Device::getCommands()throw(NutException)
426 return cmds;
427 }
428
429-Command Device::getCommand(const std::string& name)throw(NutException)
430+Command Device::getCommand(const std::string& name)
431 {
432 if(getClient()->hasDeviceCommand(getName(), name))
433 return Command(this, name);
434@@ -1054,26 +1050,26 @@ Command Device::getCommand(const std::string& name)throw(NutException)
435 return Command(NULL, "");
436 }
437
438-void Device::executeCommand(const std::string& name)throw(NutException)
439+void Device::executeCommand(const std::string& name)
440 {
441 getClient()->executeDeviceCommand(getName(), name);
442 }
443
444-void Device::login()throw(NutException)
445+void Device::login()
446 {
447 getClient()->deviceLogin(getName());
448 }
449
450-void Device::master()throw(NutException)
451+void Device::master()
452 {
453 getClient()->deviceMaster(getName());
454 }
455
456-void Device::forcedShutdown()throw(NutException)
457+void Device::forcedShutdown()
458 {
459 }
460
461-int Device::getNumLogins()throw(NutException)
462+int Device::getNumLogins()
463 {
464 return getClient()->deviceGetNumLogins(getName());
465 }
466@@ -1141,22 +1137,22 @@ bool Variable::operator<(const Variable& var)const
467 return getName()<var.getName();
468 }
469
470-std::vector<std::string> Variable::getValue()throw(NutException)
471+std::vector<std::string> Variable::getValue()
472 {
473 return getDevice()->getClient()->getDeviceVariableValue(getDevice()->getName(), getName());
474 }
475
476-std::string Variable::getDescription()throw(NutException)
477+std::string Variable::getDescription()
478 {
479 return getDevice()->getClient()->getDeviceVariableDescription(getDevice()->getName(), getName());
480 }
481
482-void Variable::setValue(const std::string& value)throw(NutException)
483+void Variable::setValue(const std::string& value)
484 {
485 getDevice()->setVariable(getName(), value);
486 }
487
488-void Variable::setValues(const std::vector<std::string>& values)throw(NutException)
489+void Variable::setValues(const std::vector<std::string>& values)
490 {
491 getDevice()->setVariable(getName(), values);
492 }
493@@ -1225,12 +1221,12 @@ bool Command::operator<(const Command& cmd)const
494 return getName()<cmd.getName();
495 }
496
497-std::string Command::getDescription()throw(NutException)
498+std::string Command::getDescription()
499 {
500 return getDevice()->getClient()->getDeviceCommandDescription(getDevice()->getName(), getName());
501 }
502
503-void Command::execute()throw(NutException)
504+void Command::execute()
505 {
506 getDevice()->executeCommand(getName());
507 }
508diff --git a/clients/nutclient.h b/clients/nutclient.h
509index ed2ea44..3d4cbcb 100644
510--- a/clients/nutclient.h
511+++ b/clients/nutclient.h
512@@ -51,9 +51,9 @@ class NutException : public std::exception
513 {
514 public:
515 NutException(const std::string& msg):_msg(msg){}
516- virtual ~NutException() throw() {}
517- virtual const char * what() const throw() {return this->_msg.c_str();}
518- virtual std::string str() const throw() {return this->_msg;}
519+ virtual ~NutException() {}
520+ virtual const char * what() const noexcept {return this->_msg.c_str();}
521+ virtual std::string str() const noexcept {return this->_msg;}
522 private:
523 std::string _msg;
524 };
525@@ -65,7 +65,7 @@ class SystemException : public NutException
526 {
527 public:
528 SystemException();
529- virtual ~SystemException() throw() {}
530+ virtual ~SystemException() {}
531 private:
532 static std::string err();
533 };
534@@ -78,7 +78,7 @@ class IOException : public NutException
535 {
536 public:
537 IOException(const std::string& msg):NutException(msg){}
538- virtual ~IOException() throw() {}
539+ virtual ~IOException() {}
540 };
541
542 /**
543@@ -88,7 +88,7 @@ class UnknownHostException : public IOException
544 {
545 public:
546 UnknownHostException():IOException("Unknown host"){}
547- virtual ~UnknownHostException() throw() {}
548+ virtual ~UnknownHostException() {}
549 };
550
551 /**
552@@ -98,7 +98,7 @@ class NotConnectedException : public IOException
553 {
554 public:
555 NotConnectedException():IOException("Not connected"){}
556- virtual ~NotConnectedException() throw() {}
557+ virtual ~NotConnectedException() {}
558 };
559
560 /**
561@@ -108,7 +108,7 @@ class TimeoutException : public IOException
562 {
563 public:
564 TimeoutException():IOException("Timeout"){}
565- virtual ~TimeoutException() throw() {}
566+ virtual ~TimeoutException() {}
567 };
568
569 /**
570@@ -132,13 +132,13 @@ public:
571 * \todo Is his method is global to all connection protocol or is it specific to TCP ?
572 * \note Actually, authentication fails only if already set, not if bad values are sent.
573 */
574- virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException)=0;
575+ virtual void authenticate(const std::string& user, const std::string& passwd)=0;
576
577 /**
578 * Disconnect from the NUTD server.
579 * \todo Is his method is global to all connection protocol or is it specific to TCP ?
580 */
581- virtual void logout()throw(NutException)=0;
582+ virtual void logout()=0;
583
584 /**
585 * Device manipulations.
586@@ -151,29 +151,29 @@ public:
587 * \param name Name of the device.
588 * \return The device.
589 */
590- virtual Device getDevice(const std::string& name)throw(NutException);
591+ virtual Device getDevice(const std::string& name);
592 /**
593 * Retrieve the list of all devices supported by UPSD server.
594 * \return The set of supported devices.
595 */
596- virtual std::set<Device> getDevices()throw(NutException);
597+ virtual std::set<Device> getDevices();
598 /**
599 * Test if a device is supported by the NUTD server.
600 * \param dev Device name.
601 * \return true if supported, false otherwise.
602 */
603- virtual bool hasDevice(const std::string& dev)throw(NutException);
604+ virtual bool hasDevice(const std::string& dev);
605 /**
606 * Retrieve names of devices supported by NUTD server.
607 * \return The set of names of supported devices.
608 */
609- virtual std::set<std::string> getDeviceNames()throw(NutException)=0;
610+ virtual std::set<std::string> getDeviceNames()=0;
611 /**
612 * Retrieve the description of a device.
613 * \param name Device name.
614 * \return Device description.
615 */
616- virtual std::string getDeviceDescription(const std::string& name)throw(NutException)=0;
617+ virtual std::string getDeviceDescription(const std::string& name)=0;
618 /** \} */
619
620 /**
621@@ -186,54 +186,54 @@ public:
622 * \param dev Device name
623 * \return Variable names
624 */
625- virtual std::set<std::string> getDeviceVariableNames(const std::string& dev)throw(NutException)=0;
626+ virtual std::set<std::string> getDeviceVariableNames(const std::string& dev)=0;
627 /**
628 * Retrieve names of read/write variables supported by a device.
629 * \param dev Device name
630 * \return RW variable names
631 */
632- virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev)throw(NutException)=0;
633+ virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev)=0;
634 /**
635 * Test if a variable is supported by a device.
636 * \param dev Device name
637 * \param name Variable name
638 * \return true if the variable is supported.
639 */
640- virtual bool hasDeviceVariable(const std::string& dev, const std::string& name)throw(NutException);
641+ virtual bool hasDeviceVariable(const std::string& dev, const std::string& name);
642 /**
643 * Retrieve the description of a variable.
644 * \param dev Device name
645 * \param name Variable name
646 * \return Variable description if provided.
647 */
648- virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException)=0;
649+ virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)=0;
650 /**
651 * Retrieve values of a variable.
652 * \param dev Device name
653 * \param name Variable name
654 * \return Variable values (usually one) if available.
655 */
656- virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException)=0;
657+ virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name)=0;
658 /**
659 * Retrieve values of all variables of a device.
660 * \param dev Device name
661 * \return Variable values indexed by variable names.
662 */
663- virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev)throw(NutException);
664+ virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev);
665 /**
666 * Intend to set the value of a variable.
667 * \param dev Device name
668 * \param name Variable name
669 * \param value Variable value
670 */
671- virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException)=0;
672+ virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)=0;
673 /**
674 * Intend to set the value of a variable.
675 * \param dev Device name
676 * \param name Variable name
677 * \param value Variable value
678 */
679- virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values)throw(NutException)=0;
680+ virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values)=0;
681 /** \} */
682
683 /**
684@@ -246,27 +246,27 @@ public:
685 * \param dev Device name
686 * \return Command names
687 */
688- virtual std::set<std::string> getDeviceCommandNames(const std::string& dev)throw(NutException)=0;
689+ virtual std::set<std::string> getDeviceCommandNames(const std::string& dev)=0;
690 /**
691 * Test if a command is supported by a device.
692 * \param dev Device name
693 * \param name Command name
694 * \return true if the command is supported.
695 */
696- virtual bool hasDeviceCommand(const std::string& dev, const std::string& name)throw(NutException);
697+ virtual bool hasDeviceCommand(const std::string& dev, const std::string& name);
698 /**
699 * Retrieve the description of a command.
700 * \param dev Device name
701 * \param name Command name
702 * \return Command description if provided.
703 */
704- virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException)=0;
705+ virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)=0;
706 /**
707 * Intend to execute a command.
708 * \param dev Device name
709 * \param name Command name
710 */
711- virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException)=0;
712+ virtual void executeDeviceCommand(const std::string& dev, const std::string& name)=0;
713 /** \} */
714
715 /**
716@@ -277,15 +277,15 @@ public:
717 * Log the current user (if authenticated) for a device.
718 * \param dev Device name.
719 */
720- virtual void deviceLogin(const std::string& dev)throw(NutException)=0;
721+ virtual void deviceLogin(const std::string& dev)=0;
722 /**
723 * Retrieve the number of user longged in the specified device.
724 * \param dev Device name.
725 * \return Number of logged-in users.
726 */
727- virtual int deviceGetNumLogins(const std::string& dev)throw(NutException)=0;
728- virtual void deviceMaster(const std::string& dev)throw(NutException)=0;
729- virtual void deviceForcedShutdown(const std::string& dev)throw(NutException)=0;
730+ virtual int deviceGetNumLogins(const std::string& dev)=0;
731+ virtual void deviceMaster(const std::string& dev)=0;
732+ virtual void deviceForcedShutdown(const std::string& dev)=0;
733
734 protected:
735 Client();
736@@ -309,7 +309,7 @@ public:
737 * \param host Server host name.
738 * \param port Server port.
739 */
740- TcpClient(const std::string& host, int port = 3493)throw(nut::IOException);
741+ TcpClient(const std::string& host, int port = 3493);
742 ~TcpClient();
743
744 /**
745@@ -317,13 +317,13 @@ public:
746 * \param host Server host name.
747 * \param port Server port.
748 */
749- void connect(const std::string& host, int port = 3493)throw(nut::IOException);
750+ void connect(const std::string& host, int port = 3493);
751
752 /**
753 * Connect to the server.
754 * Host name and ports must have already set (usefull for reconnection).
755 */
756- void connect()throw(nut::IOException);
757+ void connect();
758
759 /**
760 * Test if the connection is active.
761@@ -358,39 +358,37 @@ public:
762 */
763 int getPort()const;
764
765- virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException);
766- virtual void logout()throw(NutException);
767+ virtual void authenticate(const std::string& user, const std::string& passwd);
768+ virtual void logout();
769
770- virtual Device getDevice(const std::string& name)throw(NutException);
771- virtual std::set<std::string> getDeviceNames()throw(NutException);
772- virtual std::string getDeviceDescription(const std::string& name)throw(NutException);
773-
774- virtual std::set<std::string> getDeviceVariableNames(const std::string& dev)throw(NutException);
775- virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev)throw(NutException);
776- virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException);
777- virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException);
778- virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev)throw(NutException);
779- virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException);
780- virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values)throw(NutException);
781-
782- virtual std::set<std::string> getDeviceCommandNames(const std::string& dev)throw(NutException);
783- virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException);
784- virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException);
785-
786- virtual void deviceLogin(const std::string& dev)throw(NutException);
787- virtual void deviceMaster(const std::string& dev)throw(NutException);
788- virtual void deviceForcedShutdown(const std::string& dev)throw(NutException);
789- virtual int deviceGetNumLogins(const std::string& dev)throw(NutException);
790+ virtual Device getDevice(const std::string& name);
791+ virtual std::set<std::string> getDeviceNames();
792+ virtual std::string getDeviceDescription(const std::string& name);
793+
794+ virtual std::set<std::string> getDeviceVariableNames(const std::string& dev);
795+ virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev);
796+ virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name);
797+ virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name);
798+ virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev);
799+ virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value);
800+ virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values);
801+
802+ virtual std::set<std::string> getDeviceCommandNames(const std::string& dev);
803+ virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name);
804+ virtual void executeDeviceCommand(const std::string& dev, const std::string& name);
805+
806+ virtual void deviceLogin(const std::string& dev);
807+ virtual void deviceMaster(const std::string& dev);
808+ virtual void deviceForcedShutdown(const std::string& dev);
809+ virtual int deviceGetNumLogins(const std::string& dev);
810
811 protected:
812- std::string sendQuery(const std::string& req)throw(nut::IOException);
813- static void detectError(const std::string& req)throw(nut::NutException);
814+ std::string sendQuery(const std::string& req);
815+ static void detectError(const std::string& req);
816
817- std::vector<std::string> get(const std::string& subcmd, const std::string& params = "")
818- throw(nut::NutException);
819+ std::vector<std::string> get(const std::string& subcmd, const std::string& params = "");
820
821- std::vector<std::vector<std::string> > list(const std::string& subcmd, const std::string& params = "")
822- throw(nut::NutException);
823+ std::vector<std::vector<std::string> > list(const std::string& subcmd, const std::string& params = "");
824
825 static std::vector<std::string> explode(const std::string& str, size_t begin=0);
826 static std::string escape(const std::string& str);
827@@ -455,92 +453,92 @@ public:
828 /**
829 * Retrieve the description of the devce if specified.
830 */
831- std::string getDescription()throw(NutException);
832+ std::string getDescription();
833
834 /**
835 * Intend to retrieve the value of a variable of the device.
836 * \param name Name of the variable to get.
837 * \return Value of the variable, if available.
838 */
839- std::vector<std::string> getVariableValue(const std::string& name)throw(NutException);
840+ std::vector<std::string> getVariableValue(const std::string& name);
841 /**
842 * Intend to retrieve values of all variables of the devices.
843 * \return Map of all variables values indexed by their names.
844 */
845- std::map<std::string,std::vector<std::string> > getVariableValues()throw(NutException);
846+ std::map<std::string,std::vector<std::string> > getVariableValues();
847 /**
848 * Retrieve all variables names supported by the device.
849 * \return Set of available variable names.
850 */
851- std::set<std::string> getVariableNames()throw(NutException);
852+ std::set<std::string> getVariableNames();
853 /**
854 * Retrieve all Read/Write variables names supported by the device.
855 * \return Set of available Read/Write variable names.
856 */
857- std::set<std::string> getRWVariableNames()throw(NutException);
858+ std::set<std::string> getRWVariableNames();
859 /**
860 * Intend to set the value of a variable of the device.
861 * \param name Variable name.
862 * \param value New variable value.
863 */
864- void setVariable(const std::string& name, const std::string& value)throw(NutException);
865+ void setVariable(const std::string& name, const std::string& value);
866 /**
867 * Intend to set values of a variable of the device.
868 * \param name Variable name.
869 * \param value New variable values.
870 */
871- void setVariable(const std::string& name, const std::vector<std::string>& values)throw(NutException);
872+ void setVariable(const std::string& name, const std::vector<std::string>& values);
873
874 /**
875 * Retrieve a Variable object representing the specified variable.
876 * \param name Variable name.
877 * \return Variable object.
878 */
879- Variable getVariable(const std::string& name)throw(NutException);
880+ Variable getVariable(const std::string& name);
881 /**
882 * Retrieve Variable objects representing all variables available for the device.
883 * \return Set of Variable objects.
884 */
885- std::set<Variable> getVariables()throw(NutException);
886+ std::set<Variable> getVariables();
887 /**
888 * Retrieve Variable objects representing all Read/Write variables available for the device.
889 * \return Set of Variable objects.
890 */
891- std::set<Variable> getRWVariables()throw(NutException);
892+ std::set<Variable> getRWVariables();
893
894 /**
895 * Retrieve names of all commands supported by the device.
896 * \return Set of available command names.
897 */
898- std::set<std::string> getCommandNames()throw(NutException);
899+ std::set<std::string> getCommandNames();
900 /**
901 * Retrieve objects for all commands supported by the device.
902 * \return Set of available Command objects.
903 */
904- std::set<Command> getCommands()throw(NutException);
905+ std::set<Command> getCommands();
906 /**
907 * Retrieve an object representing a command of the device.
908 * \param name Command name.
909 * \return Command object.
910 */
911- Command getCommand(const std::string& name)throw(NutException);
912+ Command getCommand(const std::string& name);
913 /**
914 * Intend to execute a command on the device.
915 * \param name Command name.
916 */
917- void executeCommand(const std::string& name)throw(NutException);
918+ void executeCommand(const std::string& name);
919
920 /**
921 * Login current client's user for the device.
922 */
923- void login()throw(NutException);
924- void master()throw(NutException);
925- void forcedShutdown()throw(NutException);
926+ void login();
927+ void master();
928+ void forcedShutdown();
929 /**
930 * Retrieve the number of logged user for the device.
931 * \return Number of users.
932 */
933- int getNumLogins()throw(NutException);
934+ int getNumLogins();
935
936 protected:
937 Device(Client* client, const std::string& name);
938@@ -603,23 +601,23 @@ public:
939 * Intend to retrieve variable value.
940 * \return Value of the variable.
941 */
942- std::vector<std::string> getValue()throw(NutException);
943+ std::vector<std::string> getValue();
944 /**
945 * Intend to retireve variable description.
946 * \return Variable description if provided.
947 */
948- std::string getDescription()throw(NutException);
949+ std::string getDescription();
950
951 /**
952 * Intend to set a value to the variable.
953 * \param value New variable value.
954 */
955- void setValue(const std::string& value)throw(NutException);
956+ void setValue(const std::string& value);
957 /**
958 * Intend to set (multiple) values to the variable.
959 * \param value New variable values.
960 */
961- void setValues(const std::vector<std::string>& values)throw(NutException);
962+ void setValues(const std::vector<std::string>& values);
963
964 protected:
965 Variable(Device* dev, const std::string& name);
966@@ -683,13 +681,13 @@ public:
967 * Intend to retireve command description.
968 * \return Command description if provided.
969 */
970- std::string getDescription()throw(NutException);
971+ std::string getDescription();
972
973 /**
974 * Intend to retrieve command description.
975 * \return Command description if provided.
976 */
977- void execute()throw(NutException);
978+ void execute();
979
980 protected:
981 Command(Device* dev, const std::string& name);
diff --git a/debian/patches/series b/debian/patches/series
index 50dc917..b11be6b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@
110011-use-pkgconfig-module.patch110011-use-pkgconfig-module.patch
120012-add-AEG-PROTECT-NAS-support.patch120012-add-AEG-PROTECT-NAS-support.patch
130013-fix-doc-build.patch130013-fix-doc-build.patch
14Remove-dynamic-exception-specifications-from-clients.patch

Subscribers

People subscribed via source and target branches