int main()
{
- deal_II_exceptions::disable_abort_on_exception ();
-
- std::ofstream logfile("log_crash_01/output");
- deallog.attach(logfile);
- deallog << "OK" << std::endl;
-
- deallog << "no newline here!";
+ deal_II_exceptions::disable_abort_on_exception();
+
+ try
+ {
+ std::ofstream logfile("log_crash_01/output");
+ deallog.attach(logfile);
+ deallog << "OK" << std::endl;
+ deallog << "no newline here!";
+ }
+ catch (ExceptionBase &e)
+ {
+ deallog << e.get_exc_name() << std::endl;
+ }
}
int main()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile("reference/output");
deallog.attach(logfile);
deallog.depth_console(0);
r = &c;
Test d("D");
r = &d;
- // Destruction of "Test R" will
- // cause a spurious ExcNotUsed
- // here, since D was deleted first
+ // Destruction of "Test R" will cause a spurious ExcNotUsed here,
+ // since D was deleted first
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
}
DEAL::Construct C
DEAL::Construct D
DEAL::Destruct D
-DEAL::ExcInUse (counter, object_info->name(), infostring)
DEAL::Destruct C
DEAL::Destruct B
DEAL::Destruct A
+DEAL::ExcInUse (counter, object_info->name(), infostring)
int main()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile("slice_vector/output");
deallog.attach(logfile);
deallog.depth_console(0);
{
make_slice(v, 3, 5);
}
- catch(...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
-
}
{
(dof_handler.begin_active() != dof_handler2.begin_active());
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
}
}
int main ()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile("accessor_equality/output");
deallog.attach(logfile);
deallog.depth_console(0);
{
fe_values.reinit(coarse_grid.begin());
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
}
int main ()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile("distorted_cells_07/output");
deallog.attach(logfile);
deallog.depth_console(0);
for (unsigned int q=0; q<quad.size(); ++q)
integral += fe_val.JxW(q);
}
- catch (...)
- {
- }
-
+ catch (ExceptionBase &e)
+ {
+ deallog << e.get_exc_name() << std::endl;
+ }
}
deallog << "Integral = " << integral << std::endl;
}
main()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile ("distorted_mapped_cells_01/output");
deallog << std::setprecision(4) << std::fixed;
deallog.attach(logfile);
for (unsigned int q=0; q<quad.size(); ++q)
integral += fe_val.JxW(q);
}
- catch (...)
- {
- }
-
+ catch (ExceptionBase &e)
+ {
+ deallog << e.get_exc_name() << std::endl;
+ }
}
deallog << "Integral = " << integral << std::endl;
}
main()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile ("distorted_mapped_cells_02/output");
deallog << std::setprecision(4) << std::fixed;
deallog.attach(logfile);
// try to add an invalid list of indices to
// first and last row, should throw an
// exception
- deal_II_exceptions::disable_abort_on_exception();
for (unsigned int i=0; i<m.m(); ++i)
values[i] = 0.5*i - 1.5;
try
{
m.add(0,m.m(),&indices[0], &values[0], false, true);
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
try
{
m.add(m.m()-1,m.m(),&indices[0], &values[0], false, true);
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
deallog << "OK" << std::endl;
int main ()
{
+ deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile("sparse_matrix_add_entries_01/output");
deallog.attach(logfile);
deallog.depth_console(0);
{
fe_values[extr]; // invalid access
}
- catch (const std::exception &exc)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
goto ok;
}
int main()
{
+ deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile ("fe_values_view_invalid_01/output");
deallog << std::setprecision (2);
deallog.depth_console (0);
deallog.threshold_double(1.e-7);
- deal_II_exceptions::disable_abort_on_exception();
-
test<1>();
test<2>();
test<3>();
{
fe_values[extr]; // invalid access
}
- catch (const std::exception &exc)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
goto ok;
}
int main()
{
+ deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile ("fe_values_view_invalid_02/output");
deallog << std::setprecision (2);
deallog.depth_console (0);
deallog.threshold_double(1.e-7);
- deal_II_exceptions::disable_abort_on_exception();
-
test<1>();
test<2>();
test<3>();
{
fe_values[extr]; // invalid access
}
- catch (const std::exception &exc)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
goto ok;
}
int main()
{
+ deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile ("fe_values_view_invalid_03/output");
deallog << std::setprecision (2);
deallog.depth_console (0);
deallog.threshold_double(1.e-7);
- deal_II_exceptions::disable_abort_on_exception();
-
test<1>();
test<2>();
test<3>();
int main()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile("memory_consumption_01/output");
deallog.attach(logfile);
deallog.depth_console(0);
{
tr.begin()->user_pointer();
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
tr.begin()->user_index();
int main()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile("user_data_01/output");
deallog.attach(logfile);
deallog.depth_console(0);
DEAL::.....................cells
DEAL::........................................................faces
DEAL::lines
-DEAL::ExcPointerIndexClash()
DEAL::Save2D
DEAL::Load2D
DEAL::.....................cells
DEAL::.........................................................................cells
DEAL::..........................................................................................................................................................................................................................................................................................faces
DEAL::..............................................................................................................................................................................................................................................................................................................................................................................lines
-DEAL::ExcPointerIndexClash()
DEAL::Save3D
DEAL::Load3D
DEAL::.........................................................................cells
{
tr.execute_coarsening_and_refinement ();
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
}
int main(int argc, char *argv[])
{
+ deal_II_exceptions::disable_abort_on_exception();
+
#ifdef DEAL_II_WITH_MPI
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
#else
deallog.depth_console(0);
deallog.threshold_double(1.e-10);
- // we want to catch exceptions
- // instead of aborting the program
- deal_II_exceptions::disable_abort_on_exception();
-
deallog.push("2d");
test<2>(logfile);
deallog.pop();
deallog.push("2d");
test<3>(logfile);
deallog.pop();
-
-
}
{
m[v.size()];
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
deallog << "OK" << std::endl;
int main()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile ("block_mask_02/output");
deallog << std::setprecision (4);
void test ()
{
+ deal_II_exceptions::disable_abort_on_exception();
+
// test for an initialized mask
Assert (BlockMask(12,true).n_selected_blocks() == 12,
ExcInternalError());
Assert (BlockMask(12,true).n_selected_blocks(13) == 12,
ExcInternalError());
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
}
int main()
{
- deal_II_exceptions::disable_abort_on_exception();
-
std::ofstream logfile ("block_mask_06/output");
deallog << std::setprecision (4);
Assert (BlockMask(12,true).first_selected_block(13) == 0,
ExcInternalError());
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
// as should this:
Assert (BlockMask(12,false).first_selected_block() == 0,
ExcInternalError());
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
}
{
m[v.size()];
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
deallog << "OK" << std::endl;
int main()
{
deal_II_exceptions::disable_abort_on_exception();
+
std::ofstream logfile ("component_mask_02/output");
deallog << std::setprecision (4);
Assert (ComponentMask(12,true).n_selected_components(13) == 12,
ExcInternalError());
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
}
Assert (ComponentMask(12,true).first_selected_component(13) == 0,
ExcInternalError());
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
// as should this:
Assert (ComponentMask(12,false).first_selected_component() == 0,
ExcInternalError());
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
}
{
deallog << fe.block_mask (component_mask) << std::endl;
}
- catch (...)
+ catch (ExceptionBase &e)
{
- }
+ deallog << e.get_exc_name() << std::endl;
+ }
}
deallog << "OK" << std::endl;
{
fe_collection.n_blocks();
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
deallog << "OK" << std::endl;
}
deallog << "Closing" << std::endl;
- deal_II_exceptions::disable_abort_on_exception();
try
{
constraints.close();
}
- catch (...)
+ catch (ExceptionBase &e)
{
- }
+ deallog << e.get_exc_name() << std::endl;
+ }
deallog << "Closed" << std::endl;
}
int main()
{
+ deal_II_exceptions::disable_abort_on_exception();
+
const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
+ deallog.depth_console(0);
FE_Q<2> fe(3);
run(fe);
}
deallog << "Closing" << std::endl;
- deal_II_exceptions::disable_abort_on_exception();
try
{
constraints.close();
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
deallog << "Closed" << std::endl;
int main()
{
+ deal_II_exceptions::disable_abort_on_exception();
+
const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
+ deallog.depth_console(0);
run();
}
Assert(!vb.has_ghost_elements(), ExcInternalError());
Assert(v.has_ghost_elements(), ExcInternalError());
-
- deal_II_exceptions::disable_abort_on_exception();
- try
+
+ try
{
v(0)=1.0;
}
- catch (...){}
- try
+ catch (ExceptionBase &e)
+ {
+ deallog << e.get_exc_name() << std::endl;
+ }
+ try
+ {
+ v(0)*=2.0;
+ }
+ catch (ExceptionBase &e)
{
- v(0)*=2.0;
+ deallog << e.get_exc_name() << std::endl;
}
- catch (...){}
- try
+ try
{
v=0.0;
}
- catch (...){}
- try
+ catch (ExceptionBase &e)
{
- v+=v;
+ deallog << e.get_exc_name() << std::endl;
}
- catch (...){}
-
+ try
+ {
+ v+=v;
+ }
+ catch (ExceptionBase &e)
+ {
+ deallog << e.get_exc_name() << std::endl;
+ }
+
// done
if (myid==0)
deallog << "OK" << std::endl;
int main (int argc, char **argv)
{
+ deal_II_exceptions::disable_abort_on_exception();
+
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv);
unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
Assert (v_tmp.has_ghost_elements(), ExcInternalError());
- deal_II_exceptions::disable_abort_on_exception();
-
try
{
v_tmp.l2_norm();
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
try
{
v_tmp(0)=3.0;
}
- catch (...)
+ catch (ExceptionBase &e)
{
+ deallog << e.get_exc_name() << std::endl;
}
if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
int main (int argc, char **argv)
{
+ deal_II_exceptions::disable_abort_on_exception();
+
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv);
unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
v_tmp.reinit(v,false,true);
- deal_II_exceptions::disable_abort_on_exception();
-
bool exc = false;
double norm;
try
}
catch (TrilinosWrappers::VectorBase::ExcTrilinosError e)
{
+ deallog << e.get_exc_name() << std::endl;
exc = true;
}
int main (int argc, char **argv)
{
+ deal_II_exceptions::disable_abort_on_exception();
+
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv);
unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
}
}
else
- // environment variable is
- // not set, so assume
- // infinite wait time and
- // simply quit this thread
+ // environment variable is not set, so assume infinite wait time
+ // and simply quit this thread
{
}
}