]> git.lyx.org Git - lyx.git/commitdiff
Right exception rethrowing
authorYuriy Skalko <yuriy.skalko@gmail.com>
Fri, 9 Oct 2020 17:42:51 +0000 (20:42 +0300)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 12 Oct 2020 13:14:55 +0000 (15:14 +0200)
src/Paragraph.cpp
src/frontends/qt/GuiSpellchecker.cpp
src/frontends/qt/GuiView.cpp
src/mathed/MathExtern.cpp

index 707e7701645a2c398c471f4e4d0ea6eb463e68df..9cd9b8b385b6c86f86f64f166f5bd41e059b89c0 100644 (file)
@@ -1103,7 +1103,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
                // add location information and throw again.
                e.par_id = id_;
                e.pos = i;
-               throw(e);
+               throw;
        }
 
        if (close)
@@ -2878,7 +2878,7 @@ void Paragraph::latex(BufferParams const & bparams,
                                        // add location information and throw again.
                                        e.par_id = id();
                                        e.pos = i;
-                                       throw(e);
+                                       throw;
                                }
                        }
                }
index f21001369855a81d676cbd5f6a152e28e741e1f5..16df37820bf74bf99276a6b6989869e8890f4cda 100644 (file)
@@ -557,7 +557,7 @@ void SpellcheckerWidget::Private::check()
                        Alert::warning(message.title_, message.details_);
                        return;
                }
-               throw message;
+               throw;
        }
 
        // end of document or selection?
index 00f3b96ea4f7bb52e19daaaf00c7a9858f330436..2da9ce39c99d27e12c0c09fc1f2261d541a23263 100644 (file)
@@ -2412,7 +2412,7 @@ Buffer * GuiView::loadDocument(FileName const & filename, bool tolastfiles)
                newBuffer = checkAndLoadLyXFile(filename);
        } catch (ExceptionMessage const & e) {
                setBusy(false);
-               throw(e);
+               throw;
        }
        setBusy(false);
 
@@ -4878,7 +4878,7 @@ void GuiView::doShowDialog(QString const & qname, QString const & qdata,
        }
        catch (ExceptionMessage const & ex) {
                d.in_show_ = false;
-               throw ex;
+               throw;
        }
        d.in_show_ = false;
 }
index 092de56ee519f169f00f5febdcc40093b96b592b..4d53b28245679d47f90fbad8591f7395c9339601 100644 (file)
@@ -1454,7 +1454,7 @@ void writeString(docstring const & s, WriteStream & os)
                                case WriteStream::wsDefault:
                                default:
                                        // throw again
-                                       throw(e);
+                                       throw;
                                }
                        }
                }
@@ -1528,7 +1528,7 @@ void writeString(docstring const & s, WriteStream & os)
                        case WriteStream::wsDefault:
                        default:
                                // throw again
-                               throw(e);
+                               throw;
                        }
                }
        }