Try to get more info from gzip failure

This commit is contained in:
Orion Poplawski 2016-12-09 07:56:31 -07:00
parent 9924aa8c95
commit efad2fcffe
2 changed files with 29 additions and 4 deletions

View File

@ -1,14 +1,36 @@
diff -up octave-4.2.0/libinterp/dldfcn/gzip.cc.gzip octave-4.2.0/libinterp/dldfcn/gzip.cc
--- octave-4.2.0/libinterp/dldfcn/gzip.cc.gzip 2016-11-13 08:16:10.000000000 -0700
+++ octave-4.2.0/libinterp/dldfcn/gzip.cc 2016-12-08 13:23:56.325297196 -0700
@@ -449,14 +449,15 @@ namespace octave
+++ octave-4.2.0/libinterp/dldfcn/gzip.cc 2016-12-08 20:59:14.216903463 -0700
@@ -376,15 +376,18 @@ namespace octave
while (strm->avail_out == 0);
if (strm->avail_in != 0)
- throw std::runtime_error ("failed to wrote file");
+ throw std::runtime_error ("failed to write file");
}
}
void
close (void)
{
- if (deflateEnd (strm) != Z_OK)
- throw std::runtime_error ("failed to close zlib stream");
+ if (deflateEnd (strm) != Z_OK) {
+ char msg[256];
+ snprintf(msg, 255, "failed to close zlib stream: %s", strm->msg);
+ throw std::runtime_error (msg);
+ }
strm = nullptr;
// We have no error handling for failing to close source, let
@@ -449,14 +452,15 @@ namespace octave
{
X::zip (path, dest_path);
}
- catch (...)
+ catch ( const std::exception & ex )
{
+ warning ("gzip: zip threw exception %s", ex.what());
+ warning ("gzip: zip threw exception: %s", ex.what());
// Error "handling" is not including filename on the output list.
// Also remove created file which maybe was not even created
// in the first place. Note that it is possible for the file

View File

@ -14,7 +14,7 @@
Name: octave
Epoch: 6
Version: 4.2.0
Release: 9%{?rcver:.rc%{rcver}}%{?dist}
Release: 10%{?rcver:.rc%{rcver}}%{?dist}
Summary: A high-level language for numerical computations
Group: Applications/Engineering
License: GPLv3+
@ -430,6 +430,9 @@ fi
%{_pkgdocdir}/refcard*.pdf
%changelog
* Thu Dec 08 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-10
- Try to get more info from gzip failure
* Thu Dec 08 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-9
- Disable more segfaulting tests