Create and run a DRAMA task, with standard exception handling.
A convenience function wrapping up task creation and exception handling for many common cases.
This function will create a DRAMA task with the specified constructor arguments and run that task. If exceptions are thrown they are caught and appropriate messages output.
For a drama::Exception or std::exception based exception, exit() will be invoked with an appropriate non-zero return value. For other exceptions, the exception will be re-thrown to ensure a core-dump happens.
This function will only return if the task completes without error.
This version of CreateRunDramaTask is required when the constructor of TaskClass takes no arguments. Otherwise the Variadic template version will be used. It is unclear to the author why this should be needed since Variadic templates are supposed to accept zero parameters, but it appears to be due to something about the drama::Task class that requires this. The functionality is otherwise identical.
- Template Parameters
-
TaskClass | The class of the DRAMA task we are to create. |
- Examples
- dramahello.cpp, gitpathtest.cpp, gittasktest.cpp, monitor1.cpp, monitor2.cpp, threadbasic.cpp, and tocker.cpp.
References CreateRunDramaTask().
Referenced by drama::gitarg::ArgFlags< ContainerType, >::ArgFlags(), drama::sds::ArrayAccessHelper< T >::ArrayAccessHelper(), drama::ArrayParameter< SDS_T >::ArrayParameter(), drama::gitarg::Bool::Bool(), drama::gitarg::Bool::Bool(), drama::BulkData::BulkData(), drama::BulkData::BulkData(), drama::BulkDataArg::BulkDataArg(), drama::BulkDataArg::BulkDataArg(), drama::BulkDataArgSds::BulkDataArgSds(), drama::BulkDataSds::BulkDataSds(), drama::sds::DataPointer< T >::DataPointer(), drama::sds::DataPointer< T[]>::DataPointer(), drama::sds::DataPointer< T >::DataPointer(), drama::sds::DataPointer< T[]>::DataPointer(), drama::gitarg::Enum< LookupClass, EnumType >::Enum(), drama::gitarg::Enum< LookupClass, EnumType >::Enum(), drama::ErsContext::ErsContext(), drama::Exception::Exception(), drama::Exception::Exception(), drama::Exception::Exception(), drama::gitarg::Filename::Filename(), drama::gitarg::Filename::Filename(), drama::Future< T >::Future(), drama::gitarg::Id::Id(), drama::gitarg::Id::Id(), drama::sds::Id::Id(), drama::sds::IdChecker::IdChecker(), drama::sds::IdIterator::IdIterator(), drama::gitarg::Int< MinVal, MaxVal, DefaultVal >::Int(), drama::gitarg::Int< MinVal, MaxVal, DefaultVal >::Int(), drama::gitarg::Int< MinVal, MaxVal, DefaultVal >::Int(), drama::gitarg::Int< MinVal, MaxVal, DefaultVal >::Int(), drama::logging::LogStreamBuf::LogStreamBuf(), drama::logging::LogStreamBuf::LogStreamBuf(), drama::MessageUserStreamBuf< T >::MessageUserStreamBuf(), drama::Parameter< SDS_T >::Parameter(), drama::gitarg::Real< MinVal, MaxVal, DefaultVal >::Real(), drama::gitarg::Real< MinVal, MaxVal, DefaultVal >::Real(), drama::gitarg::Real< MinVal, MaxVal, DefaultVal >::Real(), drama::gitarg::Real< MinVal, MaxVal, DefaultVal >::Real(), drama::ScopeGuard< T >::ScopeGuard(), drama::ScopeGuard< T >::ScopeGuard(), drama::ScopeGuardAtomic< AT, T >::ScopeGuardAtomic(), drama::ScopeGuardAtomic< AT, T >::ScopeGuardAtomic(), drama::gitarg::String::String(), drama::gitarg::String::String(), drama::BulkData::~BulkData(), drama::ErsContext::~ErsContext(), drama::Future< void >::~Future(), drama::sds::IdChecker::~IdChecker(), drama::logging::LogStreamBuf::~LogStreamBuf(), drama::MessageUserStreamBuf< T >::~MessageUserStreamBuf(), drama::sds::Id::AddToArgCmdStruct(), drama::EntryInfo::ArgIsBulk(), drama::sds::Id::ArrayAccess(), drama::sds::Id::ArrayAccess(), drama::sds::Id::ArrayAccess(), drama::sds::Id::ArrayAccess(), ArraySize(), drama::sds::Id::Cell(), drama::sds::Id::CheckItem(), drama::Path::Control(), drama::Path::ControlWaitUntil(), drama::sds::Id::COut(), drama::ParSys::Create(), drama::ParSys::Create(), drama::sds::Id::CreateArgCmdStruct(), drama::sds::Id::CreateArgCmdStruct(), drama::sds::Id::CreateArgCmdStructSingle(), drama::sds::Id::CreateByAccess(), drama::sds::Id::CreateByImport(), drama::sds::Id::CreateChildArray(), drama::sds::Id::CreateChildArray(), CreateFutureTimepoint(), drama::ParSys::CreateItem(), CreateRunDramaTask(), CreateRunDramaTask(), drama::ParSys::CreateSds(), drama::sds::Id::CreateTopLevelArray(), drama::sds::Id::CreateTopLevelArray(), drama::BulkData::Data(), drama::sds::Id::Delete(), drama::Path::DeltaToTimePoint(), drama::thread::TAction::DoWaitForKick(), drama::EntryInfo::EntryTaskName(), drama::EntryInfo::EntryTransId(), ErsReport(), ExceptionThrowSafe(), drama::ParSys::Exists(), drama::sds::Id::Export(), drama::sds::Id::ExportDefined(), drama::sds::Id::Extract(), drama::ArrayParameter< SDS_T >::Fill(), drama::sds::Id::FillArray(), drama::sds::Id::Flush(), drama::Exception::FmtWrite(), drama::Future< T >::get(), drama::gitarg::Real< MinVal, MaxVal, DefaultVal >::Get(), drama::gitarg::Int< MinVal, MaxVal, DefaultVal >::Get(), drama::gitarg::Bool::Get(), drama::gitarg::Real< MinVal, MaxVal, DefaultVal >::Get(), drama::gitarg::Int< MinVal, MaxVal, DefaultVal >::Get(), drama::gitarg::Enum< LookupClass, EnumType >::Get(), drama::gitarg::ArgFlags< ContainerType, >::Get(), drama::ParSys::Get(), drama::sds::Id::Get(), drama::sds::Id::Get(), drama::ArrayParameter< SDS_T >::Get(), drama::sds::Id::Get(), drama::sds::Id::GetCode(), drama::sds::Id::GetDims(), drama::BulkData::GetDitsSharedMemInfo(), drama::sds::Id::GetExtra(), drama::thread::ProcessInfo::GetMessTypeCStr(), drama::sds::Id::GetName(), drama::sds::Id::GetNumItems(), drama::Path::GetParam(), drama::Path::GetParam(), drama::Path::GetParamWaitUntil(), drama::Path::GetParamWaitUntil(), drama::git::ResetArgLookup::GetStringArray(), drama::sds::Id::Insert(), drama::sds::Id::Insert(), drama::sds::Id::IsExternal(), drama::gitarg::IsFlagSet(), drama::Path::Kick(), drama::Path::KickBulk(), drama::Path::KickBulk(), drama::Path::KickBulkWaitUntil(), drama::Path::KickBulkWaitUntil(), drama::Path::KickWaitUntil(), drama::sds::Id::List(), drama::sds::Id::List(), drama::Path::LogLoad(), drama::MessageHandler::MessageUser(), drama::thread::TMessHandler::MessageUser(), drama::thread::TAction::MessageUser(), drama::thread::TUface::MessageUser(), drama::Path::MonitorCancel(), drama::Path::MonitorForward(), drama::Path::MonitorForward(), drama::Path::MonitorForward(), drama::Path::MonitorStart(), drama::Path::Obey(), drama::Path::ObeyBulk(), drama::Path::ObeyBulk(), drama::Path::ObeyBulkWaitUntil(), drama::Path::ObeyBulkWaitUntil(), drama::Path::ObeyWaitUntil(), drama::Parameter< float >::operator float(), drama::gitarg::Enum< LookupClass, EnumType >::operator std::string(), drama::sds::IdIterator::operator!=(), drama::Parameter< SDS_T >::operator!=(), drama::sds::IdIterator::operator*(), drama::Exception::operator<<(), drama::Future< T >::operator=(), drama::Future< void >::operator=(), drama::BulkData::operator=(), drama::BulkDataArg::operator=(), drama::gitarg::String::operator=(), drama::gitarg::Bool::operator=(), drama::gitarg::String::operator=(), drama::gitarg::Enum< LookupClass, EnumType >::operator=(), drama::Exception::operator=(), drama::gitarg::String::operator=(), drama::gitarg::String::operator=(), drama::Exception::operator=(), drama::Future< T >::operator=(), drama::Future< void >::operator=(), drama::sds::Id::operator=(), drama::logging::LogStreamBuf::operator=(), drama::Parameter< SDS_T >::operator=(), drama::Parameter< SDS_T >::operator==(), drama::sds::ArrayContainer< T >::operator[](), drama::gitarg::operator|(), drama::sds::Id::Pointer(), drama::sds::Id::Put(), drama::ParSys::Put(), drama::sds::Id::Put(), drama::sds::Id::Put(), drama::sds::Id::Put(), drama::sds::Id::Put(), drama::sds::Id::PutExtra(), drama::MessageHandler::PutKickHandler(), drama::MessageHandler::PutObeyHandler(), drama::sds::Id::Rename(), drama::sds::Id::Resize(), drama::thread::Monitor::Run(), SafePrintf(), drama::MessageHandler::SendBulkTrigger(), drama::ArrayParameter< SDS_T >::Set(), drama::ArrayParameter< std::string >::Set(), drama::ArrayParameter< SDS_T >::Set(), drama::Path::SetBuffers(), drama::Path::SetFile(), drama::Path::SetFlowControl(), drama::EntryInfo::SetFromDits(), drama::Path::SetHost(), drama::Future< T >::SetName(), drama::Future< void >::SetName(), drama::Path::SetNames(), drama::Path::SetParam(), drama::Path::SetParamWaitUntil(), drama::git::Path::SetPollMaxAttempts(), drama::Path::SetProg(), drama::git::Path::SetResetMode(), drama::MessageHandler::SetReturnArg(), drama::thread::TAction::SetReturnArg(), drama::MessageHandler::SetReturnArg(), drama::IsRunningType::SetStatus(), drama::Path::SetSymbols(), drama::logging::Logger::SetTimeOffset(), drama::thread::TAction::SetTimeout(), drama::thread::TAction::SetupWaitForKick(), drama::sds::Id::ShallowCopy(), drama::sds::Id::ShallowCopy(), drama::sds::Id::ShallowCopy(), drama::sds::Id::Size(), drama::sds::Id::SizeDefined(), drama::logging::Logger::SLog(), drama::logging::Logger::SLog(), drama::Exception::statusAsSysExitCode(), stringtok(), drama::sds::Id::ToSdsId(), drama::sds::Id::toString(), TSafePrintf(), drama::sds::Id::ValidateCode(), drama::thread::TAction::WaitEventTimeoutAt(), drama::thread::TAction::WaitForEvent(), drama::thread::TAction::WaitForEventTimeoutIn(), drama::thread::TAction::WaitForEventTimeoutIn(), drama::thread::TAction::WaitForKick(), drama::thread::TAction::WaitForKickTimeoutIn(), drama::thread::TAction::WaitForKickTimeoutIn(), drama::thread::TUface::WaitForTransactionFinish(), drama::thread::TUface::WaitForTransactionStart(), drama::thread::TAction::WaitKickForTimeoutAt(), and drama::sds::Id::Write().