[lldb] Fix that log enable's -f parameter causes LLDB to crash when it can't open...
authorRaphael Isemann <teemperor@gmail.com>
Mon, 17 Aug 2020 08:30:23 +0000 (10:30 +0200)
committerRaphael Isemann <teemperor@gmail.com>
Mon, 17 Aug 2020 08:43:00 +0000 (10:43 +0200)
commit867c347c32e27825a649af1ca5ccf22c350d2b8c
treeda9f22c286fa15ecd800ce350ff1bba4d17d3d29
parentc57ea1b48f26caf7922bf434187e1c277f412550
[lldb] Fix that log enable's -f parameter causes LLDB to crash when it can't open the log file

We didn't do anything with the llvm::Error we get from `Open`, so when we end up in the
error case we just crash due to the llvm::Error sanity check. Also add the missing newline
behind the error message so it no longer messes with the next (lldb) prompt.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D85970
lldb/source/Core/Debugger.cpp
lldb/test/API/commands/log/invalid-args/TestInvalidArgsLog.py