From: Wolfgang Bangerth Date: Tue, 13 Sep 2016 21:31:03 +0000 (-0600) Subject: Avoid an exception without message. X-Git-Tag: v8.5.0-rc1~674^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3113%2Fhead;p=dealii.git Avoid an exception without message. --- diff --git a/include/deal.II/base/logstream.h b/include/deal.II/base/logstream.h index ed6d187559..8398d7ac51 100644 --- a/include/deal.II/base/logstream.h +++ b/include/deal.II/base/logstream.h @@ -398,12 +398,6 @@ public: */ std::size_t memory_consumption () const; - - /** - * Exception. - */ - DeclException0(ExcNoFileStreamGiven); - private: diff --git a/source/base/logstream.cc b/source/base/logstream.cc index eb99ccc045..22159aaa6f 100644 --- a/source/base/logstream.cc +++ b/source/base/logstream.cc @@ -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; }