Skip to content

Commit

Permalink
std::cerr debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Mar 12, 2022
1 parent 0e1aa9e commit e1844f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion radiantcore/modulesystem/ModuleRegistry.cpp
Expand Up @@ -211,7 +211,7 @@ void ModuleRegistry::shutdownModules()
}
catch (const std::exception& ex)
{
std::cout << "Exception shutting down module " << pair.first << ": " << ex.what() << std::endl;
std::cerr << "Exception shutting down module " << pair.first << ": " << ex.what() << std::endl;
}
}

Expand Down
14 changes: 11 additions & 3 deletions test/RadiantTest.h
Expand Up @@ -104,6 +104,7 @@ class RadiantTest :
{
// An unhandled exception during module initialisation => display a popup and exit
rError() << "Unhandled Exception: " << ex.what() << std::endl;
std::cerr << "Unhandled Exception: " << ex.what() << std::endl;
abort();
}

Expand All @@ -119,35 +120,42 @@ class RadiantTest :
{
try
{
std::cerr << "Calling preShutdown..." << std::endl;
// Invoke any pre-shutdown custom code
preShutdown();
}
catch (const std::exception& ex)
{
std::cout << "Exception in TearDown::preShutdown(): " << ex.what() << std::endl;
std::cerr << "Exception in TearDown::preShutdown(): " << ex.what() << std::endl;
}

std::cerr << "Removing listeners..." << std::endl;

_coreModule->get()->getMessageBus().removeListener(_notificationListener);
_coreModule->get()->getMessageBus().removeListener(_gameSetupListener);

try
{
std::cerr << "GlobalModuleRegistry shutdown..." << std::endl;

// Issue a shutdown() call to all the modules
module::GlobalModuleRegistry().shutdownModules();
}
catch (const std::exception& ex)
{
std::cout << "Exception in TearDown.shutdownModules(): " << ex.what() << std::endl;
std::cerr << "Exception in TearDown.shutdownModules(): " << ex.what() << std::endl;
}

try
{
std::cerr << "Calling postShutdown..." << std::endl;

// Invoke any post-shutdown custom code
postShutdown();
}
catch (const std::exception& ex)
{
std::cout << "Exception in TearDown::postShutdown(): " << ex.what() << std::endl;
std::cerr << "Exception in TearDown::postShutdown(): " << ex.what() << std::endl;
}
}

Expand Down

0 comments on commit e1844f0

Please sign in to comment.