if( 0 != mkdir( filename.c_str(), 0755 ) ) {
if( EEXIST != errno ) {
- return "";
+ throw std::runtime_error("Storage location could not be determined");
}
//! \FIXME: Check this is a directory
auto res = std::make_unique<std::ofstream>( tname );
if( ! res->good() ) {
- throw std::string( "Failed to open file for logging: " ) + name;
+ throw std::runtime_error( std::string("Failed to open file for logging: " ) + name );
}
return res;