Skip to content

Commit

Permalink
don't throw even if can't read config
Browse files Browse the repository at this point in the history
  • Loading branch information
match065 committed May 17, 2012
1 parent c326a41 commit f2a659c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions grive/src/Config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ namespace gr {
const std::string& Config::Filename()
{
static const char *env_cfg = ::getenv( "GR_CONFIG" ) ;
static const std::string filename =
(env_cfg != 0) ? env_cfg : /*std::string( ::getenv( "HOME") ) +*/ ".grive_state" ;
static const std::string filename = (env_cfg != 0) ? env_cfg : ".grive" ;

return filename ;
}
Expand Down Expand Up @@ -57,10 +56,11 @@ Json Config::Read( const std::string& filename )
}
catch ( Exception& e )
{
throw Error()
<< File( filename )
<< expt::ErrMsg("Cannot open config file ")
<< expt::Nested(e) ;
// throw Error()
// << File( filename )
// << expt::ErrMsg("Cannot open config file ")
// << expt::Nested(e) ;
return Json() ;
}
}

Expand Down

0 comments on commit f2a659c

Please sign in to comment.