Files
clang-p2996/lldb/source/Interpreter/ScriptInterpreterNone.cpp
Enrico Granata 085577f8d0 <rdar://problem/12586188> Make ImportError a special case for "command script import", such that the error message for the exception becomes the error for the entire import operation
and silence the backtrace printout

In the process, refactor the Execute* commands in ScriptInterpreter to take an options object, and add a new setting to not mask out errors so that the callers can handle them directly
instead of having the default behavior

llvm-svn: 167067
2012-10-31 00:01:26 +00:00

42 lines
1.2 KiB
C++

//===-- ScriptInterpreterNone.cpp -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "lldb/Interpreter/ScriptInterpreterNone.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/StringList.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Interpreter/CommandInterpreter.h"
using namespace lldb;
using namespace lldb_private;
ScriptInterpreterNone::ScriptInterpreterNone (CommandInterpreter &interpreter) :
ScriptInterpreter (interpreter, eScriptLanguageNone)
{
}
ScriptInterpreterNone::~ScriptInterpreterNone ()
{
}
bool
ScriptInterpreterNone::ExecuteOneLine (const char *command, CommandReturnObject *, const ExecuteScriptOptions&)
{
m_interpreter.GetDebugger().GetErrorStream().PutCString ("error: there is no embedded script interpreter in this mode.\n");
return false;
}
void
ScriptInterpreterNone::ExecuteInterpreterLoop ()
{
m_interpreter.GetDebugger().GetErrorStream().PutCString ("error: there is no embedded script interpreter in this mode.\n");
}