diff libinterp/corefcn/__magick_read__.cc @ 29163:8f67ad8b3103

maint: Updating naming conventions for exceptions and use const where possible. * GLCanvas.cc, interpreter-qobject.cc, file-editor-tab.cc, octave-qscintilla.cc, octave-qobject.cc, Cell.cc, __eigs__.cc, __magick_read__.cc, __qp__.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, file-io.cc, graphics.cc, graphics.in.h, input.cc, interpreter.cc, ls-mat-ascii.cc, lsode.cc, oct-handle.h, oct-map.cc, quad.cc, rand.cc, sparse.cc, sub2ind.cc, toplev.cc, utils.cc, __init_gnuplot__.cc, __ode15__.cc, cdef-object.cc, ov-base-diag.cc, ov-base-mat.cc, ov-base-sparse.cc, ov-base.cc, ov-fcn-handle.cc, ov-java.cc, ov-perm.cc, ov-range.cc, ov-re-diag.cc, ov-str-mat.cc, ov.cc, pt-assign.cc, pt-eval.cc, pt-idx.cc, pt-jit.cc, pt.cc, Array-util.cc, randmtzig.cc: Update naming conventions for exceptions to use initial letter of exception type. For example, "execution_exception" is named "ee", "index_exception" is "ie". Catch "const" exceptions where possible. * gzip.cc: Add block to catch and throw interrupt_exceptions before having a catch block "(...)" for everything else.
author Rik <rik@octave.org>
date Tue, 08 Dec 2020 13:25:03 -0800
parents 89a425f2c202
children 7854d5752dd2
line wrap: on
line diff
--- a/libinterp/corefcn/__magick_read__.cc	Tue Dec 08 21:34:55 2020 +0100
+++ b/libinterp/corefcn/__magick_read__.cc	Tue Dec 08 13:25:03 2020 -0800
@@ -765,11 +765,11 @@
     {
       Magick::readImages (&imvec, ascii_fname);
     }
-  catch (Magick::Warning& w)
+  catch (const Magick::Warning& w)
     {
       warning ("Magick++ warning: %s", w.what ());
     }
-  catch (Magick::Exception& e)
+  catch (const Magick::Exception& e)
     {
       error ("Magick++ exception: %s", e.what ());
     }
@@ -1461,15 +1461,15 @@
     {
       Magick::writeImages (imvec.begin (), imvec.end (), ext + ':' + filename);
     }
-  catch (Magick::Warning& w)
+  catch (const Magick::Warning& w)
     {
       warning ("Magick++ warning: %s", w.what ());
     }
-  catch (Magick::ErrorCoder& e)
+  catch (const Magick::ErrorCoder& e)
     {
       warning ("Magick++ coder error: %s", e.what ());
     }
-  catch (Magick::Exception& e)
+  catch (const Magick::Exception& e)
     {
       error ("Magick++ exception: %s", e.what ());
     }
@@ -1705,11 +1705,11 @@
     {
       img.ping (ascii_fname);
     }
-  catch (Magick::Warning& w)
+  catch (const Magick::Warning& w)
     {
       warning ("Magick++ warning: %s", w.what ());
     }
-  catch (Magick::Exception& e)
+  catch (const Magick::Exception& e)
     {
       error ("Magick++ exception: %s", e.what ());
     }
@@ -2384,7 +2384,7 @@
             fmt.setfield ("write", Matrix ());
           formats.fast_elem_insert (idx, fmt);
         }
-      catch (Magick::Exception& e)
+      catch (const Magick::Exception&)
         {
           // Exception here are missing formats.  So we remove the format
           // from the structure and reduce idx.