FC Updates from BitShares and myself #21
1 changed files with 13 additions and 3 deletions
|
|
@ -216,10 +216,20 @@ void cli::getline( const fc::string& prompt, fc::string& line)
|
||||||
line_read = readline(prompt.c_str());
|
line_read = readline(prompt.c_str());
|
||||||
if( line_read == nullptr )
|
if( line_read == nullptr )
|
||||||
FC_THROW_EXCEPTION( fc::eof_exception, "" );
|
FC_THROW_EXCEPTION( fc::eof_exception, "" );
|
||||||
if( *line_read )
|
|
||||||
add_history(line_read);
|
|
||||||
line = line_read;
|
line = line_read;
|
||||||
free(line_read);
|
if (*line_read)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
add_history(line_read);
|
||||||
|
free(line_read);
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
free(line_read);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
}).wait();
|
}).wait();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue