Home
last modified time | relevance | path

Searched refs:Error (Results 1 – 25 of 112) sorted by relevance

12345

/ark/runtime_core/assembler/
Dmeta.cpp27 std::optional<Metadata::Error> Metadata::ValidateSize(std::string_view value) const in ValidateSize()
32 return Error("Unsigned interger value expected", Error::Type::INVALID_VALUE); in ValidateSize()
37 return Error("Value is out of range", Error::Type::INVALID_VALUE); in ValidateSize()
112 static Expected<T, Metadata::Error> ConvertFromString(std::string_view value) in ConvertFromString()
120 …return Unexpected(Metadata::Error("Excepted integer literal", Metadata::Error::Type::INVALID_VALUE… in ConvertFromString()
125 … return Unexpected(Metadata::Error("Value is out of range", Metadata::Error::Type::INVALID_VALUE)); in ConvertFromString()
132 static Expected<ScalarValue, Metadata::Error> CreatePrimitiveValue(std::string_view value, in CreatePrimitiveValue()
137 return Unexpected(res.Error()); in CreatePrimitiveValue()
142 … return Unexpected(Metadata::Error("Value is out of range", Metadata::Error::Type::INVALID_VALUE)); in CreatePrimitiveValue()
149 static Expected<ScalarValue, Metadata::Error> CreateValue( in CreateValue()
[all …]
Dassembly-parser.cpp41 context_.err = GetError("Expected keyword.", Error::ErrorType::ERR_BAD_KEYWORD); in ParseRecordFields()
63 if (context_.err.err != Error::ErrorType::ERR_NONE) { in ParseRecordFields()
72 …context_.err = GetError("Expected a new field on the next line.", Error::ErrorType::ERR_BAD_KEYWOR… in ParseRecordFields()
90 … GetError("Repeated field names in the same record.", Error::ErrorType::ERR_REPEATING_FIELD_NAME); in ParseFieldName()
104 context_.err = GetError("Invalid field name.", Error::ErrorType::ERR_BAD_OPERATION_NAME); in ParseFieldName()
121 context_.err = GetError("Expected ']'.", Error::ErrorType::ERR_BAD_ARRAY_TYPE_BOUND); in ParseType()
142 context_.err = GetError("Not a correct type.", Error::ErrorType::ERR_BAD_FIELD_VALUE_TYPE); in ParseFieldType()
164 … context_.err = GetError("Expected field name.", Error::ErrorType::ERR_BAD_FIELD_MISSING_NAME, +1); in ParseRecordField()
196 context_.err = GetError("Expected keyword.", Error::ErrorType::ERR_BAD_KEYWORD); in ParseFunctionCode()
237 … GetError("No record can be defined inside another record.", Error::ErrorType::ERR_BAD_DEFINITION); in ParseAsRecord()
[all …]
Dmeta.h36 class Error {
48 Error(std::string msg, Type type) : msg_(std::move(msg)), type_(type) {} in Error() function
49 ~Error() = default;
50 DEFAULT_MOVE_SEMANTIC(Error);
51 DEFAULT_COPY_SEMANTIC(Error);
72 std::optional<Error> SetAttribute(std::string_view attribute) in SetAttribute()
96 std::optional<Error> SetAttributeValue(std::string_view attribute, std::string_view value) in SetAttributeValue()
138 virtual std::optional<Error> ValidateData() in ValidateData()
148 virtual std::optional<Error> Validate(std::string_view attribute) const = 0;
150 …virtual std::optional<Error> Validate(std::string_view attribute, std::string_view value) const = …
[all …]
Dassembly-parser.h42 using Instructions = std::pair<std::vector<Ins>, Error>;
66 Expected<Program, Error> Parse(TokenSet &vectors_tokens, const std::string &file_name = "");
72 Expected<Program, Error> Parse(const std::string &source, const std::string &file_name = "");
77 Error ShowError() const in ShowError()
97 panda::pandasm::Error err_;
103 …inline Error GetError(const std::string &mess = "", Error::ErrorType err = Error::ErrorType::ERR_N…
106 return Error(mess, line_stric_, err, add_mess,
112 …inline void GetWarning(const std::string &mess = "", Error::ErrorType err = Error::ErrorType::ERR_…
118 … context_.tokens[context_.number - 1].whole_line, Error::ErrorClass::WARNING);
184 Expected<Program, Error> ParseAfterMainLoop(const std::string &file_name);
[all …]
Derror.h23 struct Error { struct
100 inline Error() : Error("No messages", 0, ErrorType::ERR_NONE, "", 0, 0, "") {} in Error() argument
102 …inline Error(std::string s, size_t line, ErrorType error_type, std::string overinfo, size_t p, siz…
116 using ErrorList = std::vector<Error>; argument
/ark/runtime_core/runtime/include/tooling/
Ddebug_interface.h43 class Error {
67 Error(Type type, std::string msg) : type_(type), msg_(std::move(msg)) {} in Error() function
79 ~Error() = default;
81 DEFAULT_COPY_SEMANTIC(Error);
82 DEFAULT_MOVE_SEMANTIC(Error);
367 virtual std::optional<Error> RegisterHooks(PtHooks *hooks) = 0;
373 virtual std::optional<Error> UnregisterHooks() = 0;
379 virtual std::optional<Error> EnableAllGlobalHook() = 0;
385 virtual std::optional<Error> DisableAllGlobalHook() = 0;
394 …virtual std::optional<Error> SetNotification(PtThread thread, bool enable, PtHookType hookType) = …
[all …]
/ark/runtime_core/runtime/tooling/
Ddebugger.cpp47 std::optional<Error> Debugger::SetNotification(PtThread thread, bool enable, PtHookType hookType) in SetNotification()
67 std::optional<Error> Debugger::SetBreakpoint(const PtLocation &location) in SetBreakpoint()
71 return Error(Error::Type::METHOD_NOT_FOUND, in SetBreakpoint()
77 …return Error(Error::Type::INVALID_BREAKPOINT, std::string("Invalid breakpoint location: bytecode o… in SetBreakpoint()
84 return Error(Error::Type::BREAKPOINT_ALREADY_EXISTS, in SetBreakpoint()
92 std::optional<Error> Debugger::RemoveBreakpoint(const PtLocation &location) in RemoveBreakpoint()
96 return Error(Error::Type::METHOD_NOT_FOUND, in RemoveBreakpoint()
102 return Error(Error::Type::BREAKPOINT_NOT_FOUND, "Breakpoint not found"); in RemoveBreakpoint()
134 Expected<panda::Frame::VRegister *, Error> Debugger::GetVRegByPtThread(PtThread thread, uint32_t fr… in GetVRegByPtThread()
139 return Unexpected(Error(Error::Type::THREAD_NOT_SUSPENDED, in GetVRegByPtThread()
[all …]
Ddebugger.h137 Expected<PtMethod, Error> GetPtMethod(const PtLocation &location) const override;
139 std::optional<Error> RegisterHooks(PtHooks *hooks) override in RegisterHooks()
145 std::optional<Error> UnregisterHooks() override in UnregisterHooks()
151 std::optional<Error> EnableAllGlobalHook() override in EnableAllGlobalHook()
157 std::optional<Error> DisableAllGlobalHook() override in DisableAllGlobalHook()
163 … std::optional<Error> SetNotification(PtThread thread, bool enable, PtHookType hookType) override;
164 std::optional<Error> SetBreakpoint(const PtLocation &location) override;
166 std::optional<Error> RemoveBreakpoint(const PtLocation &location) override;
168 Expected<std::unique_ptr<PtFrame>, Error> GetCurrentFrame(PtThread thread) const override;
170 …std::optional<Error> EnumerateFrames(PtThread thread, std::function<bool(const PtFrame &)> callbac…
[all …]
/ark/runtime_core/assembler/tests/
Dlexer_test.cpp36 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
46 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
60 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
70 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
82 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
93 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
102 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
111 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
128 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
139 ASSERT_EQ(tok.second.err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
[all …]
Dparser_test.cpp36 ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
50 ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
61 … ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_BAD_LABEL_EXT) << "ERR_BAD_LABEL_EXT expected"; in TEST()
72 …ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_BAD_OPERATION_NAME) << "ERR_BAD_OPERATION_NAME … in TEST()
85 ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
98 ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
109 ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_BAD_INTEGER_NAME) << "ERR_NONE expected"; in TEST()
120 …ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_BAD_OPERATION_NAME) << "ERR_BAD_OPERATION expec… in TEST()
137 ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
153 ASSERT_EQ(p.ShowError().err, Error::ErrorType::ERR_NONE) << "ERR_NONE expected"; in TEST()
[all …]
/ark/runtime_core/libpandabase/os/
Derror.h26 class Error {
28 explicit Error(int err) : err_(err) {} in Error() function
30 explicit Error(std::string msg) : err_(std::move(msg)) {} in Error() function
34 virtual ~Error() = default;
36 DEFAULT_COPY_SEMANTIC(Error);
37 DEFAULT_MOVE_SEMANTIC(Error);
Dmem.h49 std::optional<Error> MakeMemReadExec(void *mem, size_t size);
57 std::optional<Error> MakeMemReadWrite(void *mem, size_t size);
65 std::optional<Error> MakeMemReadOnly(void *mem, size_t size);
91 Expected<const std::byte *, Error> MakeReadExec() in MakeReadExec()
101 Expected<const std::byte *, Error> MakeReadOnly() in MakeReadOnly()
111 Expected<std::byte *, Error> MakeReadWrite() in MakeReadWrite()
329 std::optional<Error> UnmapRaw(void *mem, size_t size);
362 std::optional<Error> TagAnonymousMemory(const void *mem, size_t size, const char *tag);
/ark/runtime_core/libpandabase/os/unix/
Dpipe.cpp60 Expected<size_t, Error> ReadFromPipe(const UniqueFd &pipe_fd, void *buf, size_t size) in ReadFromPipe()
64 return Unexpected(Error(errno)); in ReadFromPipe()
69 Expected<size_t, Error> WriteToPipe(const UniqueFd &pipe_fd, const void *buf, size_t size) in WriteToPipe()
73 return Unexpected(Error(errno)); in WriteToPipe()
78 Expected<size_t, Error> WaitForEvent(const UniqueFd *handles, size_t size, EventType type) in WaitForEvent()
87 return Unexpected(Error("Unknown event type")); in WaitForEvent()
100 return Unexpected(Error(errno)); in WaitForEvent()
111 std::optional<Error> Dup2(const UniqueFd &source, const UniqueFd &target) in Dup2()
114 return Error("Source fd is invalid"); in Dup2()
117 return Error(errno); in Dup2()
Dlibrary_loader.cpp22 Expected<LibraryHandle, Error> Load(std::string_view filename) in Load()
29 return msg != nullptr ? Unexpected(Error(msg)) : Unexpected(Error("no error message")); in Load()
32 Expected<void *, Error> ResolveSymbol(const LibraryHandle &handle, std::string_view name) in ResolveSymbol()
39 return msg != nullptr ? Unexpected(Error(msg)) : Unexpected(Error("no error message")); in ResolveSymbol()
Dfile.h43 Expected<size_t, Error> Read(void *buf, size_t n) const in Read()
47 return Unexpected(Error(errno)); in Read()
61 Expected<size_t, Error> Write(const void *buf, size_t n) const in Write()
65 return Unexpected(Error(errno)); in Write()
88 Expected<size_t, Error> GetFileSize() const in GetFileSize()
102 return Unexpected(Error(errno)); in GetFileSize()
125 static Expected<std::string, Error> GetTmpPath() in GetTmpPath()
139 static Expected<std::string, Error> GetExecutablePath() in GetExecutablePath()
145 return Unexpected(Error(errno)); in GetExecutablePath()
152 static Expected<std::string, Error> GetAbsolutePath(std::string_view relative_path) in GetAbsolutePath()
[all …]
Dexec.cpp25 Expected<int, Error> Exec(Span<const char *> args) in Exec()
38 return Unexpected(Error(errno)); in Exec()
44 return Unexpected(Error(errno)); in Exec()
49 return Unexpected(Error("Process finished improperly")); in Exec()
Dpipe.h32 Expected<size_t, Error> ReadFromPipe(const UniqueFd &pipe_fd, void *buf, size_t size);
34 Expected<size_t, Error> WriteToPipe(const UniqueFd &pipe_fd, const void *buf, size_t size);
38 Expected<size_t, Error> WaitForEvent(const UniqueFd *handles, size_t size, EventType type);
40 std::optional<Error> Dup2(const UniqueFd &source, const UniqueFd &target);
Dmem.cpp68 std::optional<Error> MakeMemReadExec(void *mem, size_t size) in MakeMemReadExec()
73 return Error(errno); in MakeMemReadExec()
78 std::optional<Error> MakeMemReadWrite(void *mem, size_t size) in MakeMemReadWrite()
83 return Error(errno); in MakeMemReadWrite()
89 std::optional<Error> MakeMemReadOnly(void *mem, size_t size) in MakeMemReadOnly()
94 return Error(errno); in MakeMemReadOnly()
210 std::optional<Error> UnmapRaw(void *mem, size_t size) in UnmapRaw()
215 return Error(errno); in UnmapRaw()
235 std::optional<Error> TagAnonymousMemory([[maybe_unused]] const void *mem, [[maybe_unused]] size_t s… in TagAnonymousMemory()
249 return Error(errno); in TagAnonymousMemory()
/ark/runtime_core/libpandabase/os/windows/
Dfile.h44 Expected<size_t, Error> Read(void *buf, size_t n) const in Read()
48 return Unexpected(Error(errno)); in Read()
63 Expected<size_t, Error> Write(const void *buf, size_t n) const in Write()
67 return Unexpected(Error(errno)); in Write()
90 Expected<size_t, Error> GetFileSize() const in GetFileSize()
98 return Unexpected(Error(errno)); in GetFileSize()
125 static Expected<std::string, Error> GetTmpPath();
127 static Expected<std::string, Error> GetExecutablePath();
129 static Expected<std::string, Error> GetAbsolutePath(std::string_view relative_path) in GetAbsolutePath()
135 return Unexpected(Error(errno)); in GetAbsolutePath()
Dfile.cpp63 Expected<std::string, Error> File::GetTmpPath() in GetTmpPath()
68 return Unexpected(Error(GetLastError())); in GetTmpPath()
74 Expected<std::string, Error> File::GetExecutablePath() in GetExecutablePath()
79 return Unexpected(Error(GetLastError())); in GetExecutablePath()
/ark/runtime_core/libpandabase/tests/
Dexpected_test.cpp67 EXPECT_EQ(e2.Error(), ErrorCode::First); in TEST()
68 EXPECT_EQ(e3.Error(), ErrorCode::Second); in TEST()
74 EXPECT_EQ(e1.Error(), ErrorCode::First); in TEST()
75 EXPECT_EQ((Expected<int, ErrorCode>(Unexpected(ErrorCode::Second)).Error()), ErrorCode::Second); in TEST()
92 EXPECT_EQ(t.Error(), ErrorCode::First); in TEST()
103 EXPECT_EQ(res1.Error(), ErrorCode::First); in TEST()
105 EXPECT_EQ(res3.Error(), ErrorCode::Second); in TEST()
/ark/runtime_core/assembler/extensions/ecmascript/
Decmascript_meta.h81 std::optional<Error> Validate(std::string_view attribute) const override;
83 … std::optional<Error> Validate(std::string_view attribute, std::string_view value) const override;
126 std::optional<Error> Validate(std::string_view attribute) const override;
128 … std::optional<Error> Validate(std::string_view attribute, std::string_view value) const override;
171 std::optional<Error> Validate(std::string_view attribute) const override;
173 … std::optional<Error> Validate(std::string_view attribute, std::string_view value) const override;
216 std::optional<Error> Validate(std::string_view attribute) const override;
218 … std::optional<Error> Validate(std::string_view attribute, std::string_view value) const override;
/ark/runtime_core/runtime/
Dpanda_vm.cpp43 Expected<int, Runtime::Error> PandaVM::InvokeEntrypoint(Method *entrypoint, const std::vector<std::… in InvokeEntrypoint()
47 return Unexpected(Runtime::Error::INVALID_ENTRY_POINT); in InvokeEntrypoint()
49 Expected<int, Runtime::Error> ret = InvokeEntrypointImpl(entrypoint, args); in InvokeEntrypoint()
/ark/runtime_core/assembler/templates/
Dopcode_parsing.h.erb47 Error::ErrorType::WAR_UNEXPECTED_RETURN_TYPE);
64 … context_.err = GetError("Expected comma.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS);
78 … context_.err = GetError("Register width mismatch.", Error::ErrorType::ERR_BAD_OPERAND);
80 } else if (context_.err.err == Error::ErrorType::ERR_NONE) {
81 … context_.err = GetError("Invalid name of register.", Error::ErrorType::ERR_BAD_NAME_REG);
119 … context_.err = GetError("Expected more arguments.", Error::ErrorType::ERR_BAD_NUMBER_OPERANDS);
127 … context_.err = GetError("No such operation.", Error::ErrorType::ERR_BAD_NONEXISTING_OPERATION);
/ark/ts2abc/ts2panda/templates/
DbuiltinsMap.ts.erb53 … throw new Error("Intrinsic getSubCode subcode(" + ins.mnemonic + ") ir = " + ins.toString());
75 throw new Error("<%= i-2%> parameters must be Imm <" + ins.toString() + ">");
80 throw new Error("<%= i-2%> parameters must be VReg <" + ins.toString() + ">");
85 throw new Error("<%= i-2%> parameters must be string <" + ins.toString() + ">");
90 throw new Error("<%= i-2%> parameters must be string <" + ins.toString() + ">");
109 … throw new Error("Intrinsic can't found subcode(" + ins.mnemonic + ") ir = " + ins.toString());

12345