]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid an exception without message. 3113/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 13 Sep 2016 21:31:03 +0000 (15:31 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 13 Sep 2016 21:31:03 +0000 (15:31 -0600)
include/deal.II/base/logstream.h
source/base/logstream.cc

index ed6d187559a780d08b4d285b63e423ee74d72a21..8398d7ac514d004403bbabe71f678d0ccd9e3099 100644 (file)
@@ -398,12 +398,6 @@ public:
    */
   std::size_t memory_consumption () const;
 
-
-  /**
-   * Exception.
-   */
-  DeclException0(ExcNoFileStreamGiven);
-
 private:
 
 
index eb99ccc045c753033da4d1ff14367e1ad7237eb7..22159aaa6ff5b8f1274dbc4ffdde5744fad37892 100644 (file)
@@ -260,7 +260,9 @@ LogStream::get_console()
 std::ostream &
 LogStream::get_file_stream()
 {
-  Assert(file, ExcNoFileStreamGiven());
+  Assert(file,
+         ExcMessage("You can't ask for the std::ostream object for the output "
+                    "file if none had been set before."));
   return *file;
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.