]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
check the proper state of the ofstreams before using them for output.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Nov 2002 13:59:43 +0000 (13:59 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Nov 2002 13:59:43 +0000 (13:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@6746 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/table_handler.cc

index 934431d84f3ee0acb27b453767ee28d66ffa601c..066bcdff04e52e342566aede6a6f786a345653b4 100644 (file)
@@ -217,6 +217,8 @@ void TableHandler::set_scientific (const std::string &key,
 
 void TableHandler::write_text(std::ostream &out) const
 {
+  AssertThrow (out, ExcIO());  
+  
   std::vector<std::string> sel_columns;
   get_selected_columns(sel_columns);
 
@@ -331,6 +333,8 @@ void TableHandler::write_text(std::ostream &out) const
 
 void TableHandler::write_tex(std::ofstream &out) const
 {
+  AssertThrow (out, ExcIO());
+  
   out << "\\documentclass[10pt]{report}" << std::endl
       << "\\usepackage{float}" << std::endl << std::endl << std::endl
       << "\\begin{document}" << std::endl

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.