| /arkcompiler/ets_frontend/ets2panda/linter/ |
| D | .eslintrc.json | 12 "accessor-pairs": "error", 13 "arrow-body-style": ["error", "always"], 15 "class-methods-use-this": ["error", { "exceptMethods": [], "enforceForClassFields": true }], 16 "complexity": ["error", { "max": 15 }], 17 "consistent-return": ["error", { "treatUndefinedAsUnspecified": false }], 18 "curly": ["error", "all"], 19 "default-case": "error", 21 "dot-notation": "error", 22 "eqeqeq": ["error", "smart"], 23 "func-style": ["error", "declaration", {"allowArrowFunctions": true}], [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tools/declgen_ts2sts/ |
| D | .eslintrc.json | 12 "arrow-body-style": ["error", "always"], 14 "class-methods-use-this": ["error", { "exceptMethods": [], "enforceForClassFields": true }], 15 "complexity": ["error", { "max": 15 }], 16 "consistent-return": ["error", { "treatUndefinedAsUnspecified": false }], 17 "curly": ["error", "all"], 18 "dot-notation": "error", 19 "eqeqeq": ["error", "always"], 20 "max-depth": ["error", { "max": 4 }], 21 "multiline-comment-style": ["error", "starred-block"], 22 "@stylistic/no-confusing-arrow": "error", [all …]
|
| /arkcompiler/ets_runtime/test/aottest/tryldglobalbyname_global_object/ |
| D | tryldglobalbyname_global_object.ts | 25 } catch (error) { 26 print(error); 37 } catch (error) { 38 print(error); 43 print(Error); 44 globalThis.Error = "Error"; 45 print(Error); 46 delete globalThis.Error; 48 print(Error); 49 } catch (error) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/06.type_inference/01.smart_types/ |
| D | un_bool_ops.params.yaml | 21 let v: string|number|Error|null|boolean = new Error() 28 let v: string|number|Error|null|boolean = new Error() 32 let v: string|number|Error|null|boolean = new Error() 33 let q: Error|boolean = true 40 let v: string|number|Error|null|boolean = new Error() 41 let q: Error|boolean = true 49 let v: string|number|Error|null|boolean = new Error() 50 let q: Error|boolean = false 57 let v: string|number|Error|null|boolean = new Error() 58 let q: Error|boolean = true [all …]
|
| D | un_num_ops.params.yaml | 21 let v: string|number|Error|null = new Error() 33 let v: string|number|Error|null = new Error() 40 let v: string|number|Error|null = new Error() 44 let v: string|number|Error|null = new Error() 51 let v: string|number|Error|null = new Error() 59 let v: string|number|Error|null = new Error() 65 let v: string|number|Error|null = new Error() 72 let v: string|number|Error|null = new Error() 79 let v: string|number|Error|null = new Error() 87 let v: string|number|Error|null = new Error() [all …]
|
| /arkcompiler/runtime_core/static_core/irtoc/backend/ |
| D | dwarf_builder.cpp | 38 [[maybe_unused]] int *error) in CreateSectionCallback() argument 62 Dwarf_Error error {nullptr}; in DwarfBuilder() local 66 this, GetIsaName(GetArch()), "V4", nullptr, &dwarf_, &error); in DwarfBuilder() 67 if (error != DW_DLV_OK) { in DwarfBuilder() 68 LOG(FATAL, COMPILER) << "Dwarf initialization failed: " << dwarf_errmsg(error); in DwarfBuilder() 71 int res = dwarf_pro_set_default_string_form(dwarf_, DW_FORM_string, &error); in DwarfBuilder() 73 LOG(FATAL, COMPILER) << "dwarf_pro_set_default_string_form failed: " << dwarf_errmsg(error); in DwarfBuilder() 76 …eUnitDie_ = dwarf_new_die(dwarf_, DW_TAG_compile_unit, nullptr, nullptr, nullptr, nullptr, &error); in DwarfBuilder() 77 if (error != DW_DLV_OK || IsDwarfBadAddr(compileUnitDie_)) { in DwarfBuilder() 78 LOG(FATAL, COMPILER) << "dwarf_new_die failed: " << dwarf_errmsg(error); in DwarfBuilder() [all …]
|
| /arkcompiler/toolchain/tooling/base/ |
| D | pt_params.cpp | 22 std::string error; in Create() local 30 error += "Wrong type of 'maxScriptsCacheSize';"; in Create() 33 if (!error.empty()) { in Create() 34 LOG_DEBUGGER(ERROR) << "EnableParams::Create " << error; in Create() 44 std::string error; in Create() local 51 error += "Failed to convert 'callFrameId' from string to int;"; in Create() 54 error += "Unknown or wrong type of 'callFrameId';"; in Create() 61 error += "Unknown or wrong type of 'expression';"; in Create() 68 error += "Wrong type of 'objectGroup';"; in Create() 75 error += "Wrong type of 'includeCommandLineAPI';"; in Create() [all …]
|
| /arkcompiler/ets_runtime/test/sharedtest/check/ |
| D | sharedcheck.ts | 148 } catch (error) { 149 print("Fail to delete propNumber. err: " + error) 158 } catch (error) { 159 print("Fail to extend prop with defineProperty. err: " + error); 165 } catch (error) { 166 print("Fail to extend prop1 with defineProperty. err: " + error) 172 } catch (error) { 173 print("Fail to extend prop2 with defineProperties. err: " + error) 179 } catch (error) { 180 print("Fail to extend prop3 with stobjbyname. err: " + error) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/mock/ |
| D | array_native_test_2.cpp | 41 ets_error error = env_->ErrorOccurred(); in TEST_F() local 42 ASSERT_NE(error, nullptr); in TEST_F() 44 ASSERT_EQ(env_->IsInstanceOf(static_cast<ets_object>(error), errorClass), ETS_TRUE); in TEST_F() 49 ets_error error = env_->ErrorOccurred(); in TEST_F() local 50 ASSERT_NE(error, nullptr); in TEST_F() 52 ASSERT_EQ(env_->IsInstanceOf(static_cast<ets_object>(error), errorClass), ETS_TRUE); in TEST_F() 57 ets_error error = env_->ErrorOccurred(); in TEST_F() local 58 ASSERT_NE(error, nullptr); in TEST_F() 60 ASSERT_EQ(env_->IsInstanceOf(static_cast<ets_object>(error), errorClass), ETS_TRUE); in TEST_F() 76 ets_error error = env_->ErrorOccurred(); in TEST_F() local [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/doc/spec/ |
| D | 12_errors.rst | 15 Error Handling 39 runtime error 48 - *error* to denote runtime errors, and 66 error 73 ``Error`` as predefined types are discussed below. 80 error 93 ``Error`` is the base class of all errors. Defining a new error class is 94 normally not required because essential error classes for various cases (e.g., 98 However, a developer can define a new error by using ``Error``, or any 99 derived class as the base of the new class. An example of error handling is [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/ |
| D | Errors.sts | 19 * @class Represents an error that occurs when assertion fails. 22 export class AssertionError extends Error { 37 * @class Represents an error that occurs when division by zero is performed. 39 export class DivideByZeroError extends Error { 46 * @class Represents an error that occurs when null pointer is dereferenced. 48 export class NullPointerError extends Error { 55 * @class Represents an error that occurs when exception is thrown and not catched 57 export class UncatchedExceptionError extends Error { 64 * @class Represents an error that occurs when trying to interpret syntactically invalid code 66 export class SyntaxError extends Error { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/ |
| D | Errors.sts | 19 * @class Represents an error that occurs when global eval() function fails 21 export class EvalError extends Error { 36 …* @class Represents an error that occurs when an operation could not be performed, typically (but … 38 export class TypeError extends Error { 53 …* @class Represents an error that occurs when a variable that doesn't exist (or hasn't yet been in… 55 export class ReferenceError extends Error { 70 …* @class Represents an error that occurs when a global URI handling function was used in a wrong w… 72 export class URIError extends Error { 87 * The AggregateError object represents an error when several errors 88 * need to be wrapped in a single error. [all …]
|
| D | Error.sts | 27 * Strores information about stacktrace and cause in case of an error. 28 * Serves as a base class for all error classes. 30 export class Error { 38 * Constructs a new error instance with provided message and cause 40 * @param message message of the error 42 * @param options options of the error 45 this("Error", message, options) 50 * Constructs a new error instance with provided message, options and name 52 * @param name name of the error 54 * @param message message of the error [all …]
|
| /arkcompiler/ets_frontend/ets2panda/linter/test/ |
| D | sendable_class_interface_property.sts | 65 prop1: string[]; // ERROR, sendable class property cannot be array 66 prop2: NonSendableClass2; // ERROR, sendable class property cannot be non-sendable-class 67 …prop3: NonSendableClass2 | null; // ERROR, sendable class property cannot be non-sendable-class un… 68 …prop4: NonSendableInterface | number; // ERROR, sendable class property cannot be non-sendable-cla… 69 …prop5: NonSendableClass2 | null | undefined; // ERROR, sendable class property cannot be non-senda… 70 prop6: alias2; // ERROR, sendable class property cannot be non-sendable-type 71 prop7: alias3; // ERROR, sendable class property cannot be non-sendable-type 72 prop8: RegularEnum; // ERROR, sendable class property cannot be non-sendable-type 73 prop9: RegularEnum1; // ERROR, sendable class property cannot be non-sendable-type 74 prop10: RegularEnum2; // ERROR, sendable class property cannot be non-sendable-type [all …]
|
| D | sendable_no_structural_typing.sts | 41 let a1: SC1 = new NC1(); // ERROR 42 a1 = new NC1();// ERROR 44 handle(new NC1());// ERROR 48 new Main1(new NC1());// ERROR 50 const proxy: IProxy = {map: new NC1()};// ERROR 51 const proxies: IProxy[] = [{map: new NC1()}];// ERROR 56 let b2: SC1 = new NC1(); // ERROR 58 let b4: SCT1<string> = new NCT1<string>(); // ERROR 60 let b6: SC1 | NC1 = new SC2(); // ERROR 62 let b8: SC1 | NC1 = new NC2(); // ERROR [all …]
|
| D | sendable_captured_variables.sts | 52 public p = localVar; // ERROR 53 static ps = localVar; // ERROR 59 let s = localVar; // ERROR 61 s = localFun(); // ERROR 69 let c = new sendableNamespce.SendableClassExp(); // ERROR 81 b = LocalRGB.RED; // ERROR 82 console.log(LocalRGB.BLUE); // ERROR 86 SendableClass.ps = localVar; // ERROR 88 lc = new LocalClass(); // ERROR 90 console.log(LocalClass.b); // ERROR [all …]
|
| D | sendable_function.sts | 32 @Other // ERROR 47 function sf4():void; // ERROR 55 @Other // ERROR 71 @Other // ERROR 74 type Sft5 = number; // ERROR 76 type Sft6 = Sft; // ERROR 80 type Sft8 = Sft4; // ERROR 93 const a2:Nft = nf; // ERROR 95 const a4:Nc = new Nc(); // ERROR 111 const a2:Nft = nf; // ERROR [all …]
|
| /arkcompiler/ets_runtime/test/moduletest/fortest/ |
| D | expect_output.txt | 66 Error: OK 67 Error: OK 68 Error: OK 69 Error: OK 70 Error: OK 71 Error: OK 72 Error: OK 73 Error: OK 74 Error: OK 75 Error: OK [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/ |
| D | ErrorsTest.sts | 26 failures += test(testCreateError(), "Create an Error object with a message"); 27 failures += test(testThrowError(), "Throw an Error and catch it"); 28 failures += test(testErrorMessage(), "Validate the message of the caught Error"); 29 failures += test(testErrorWithCause(), "Error object with cause"); 42 let err = new Error("Test error"); 43 let errSc = Error("Test error"); 44 if (errSc.message == err.message && err.message == "Test error") { 52 throw new Error("Test throw"); 53 } catch (err: Error) { 60 throw new Error("Error message test"); [all …]
|
| /arkcompiler/ets_frontend/arkguard/test/grammar/ecmascript_newfeatures/ |
| D | aggregate_error.ts | 19 setTimeout(() => reject(new Error('Promise 1 error')), 1000); 22 setTimeout(() => reject(new Error('Promise 2 error')), 2000); 25 setTimeout(() => reject(new Error('Promise 3 error')), 3000); 31 .catch((error) => { 32 if (error instanceof AggregateError) { 33 assert(error.errors[0].message === 'Promise 1 error', 'success'); 34 assert(error.errors[1].message === 'Promise 2 error', 'success'); 35 assert(error.errors[2].message === 'Promise 3 error', 'success');
|
| /arkcompiler/ets_frontend/ets2panda/linter/test_rules/ |
| D | rule71.sts | 23 // Error, no autofix 26 // No error 38 // Error, no autofix 41 // Error, no autofix 45 // Error, no autofix 48 // Error, no autofix 52 // Error, no autofix 57 // Error, autofix 60 // Error, autofix 63 // Error, no autofix [all …]
|
| /arkcompiler/runtime_core/static_core/assembler/ |
| D | meta.cpp | 27 std::optional<Metadata::Error> Metadata::ValidateSize(std::string_view value) const in ValidateSize() 32 return Error("Unsigned integer 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() 121 …return Unexpected(Metadata::Error("Excepted integer literal", Metadata::Error::Type::INVALID_VALUE… in ConvertFromString() 126 … return Unexpected(Metadata::Error("Value is out of range", Metadata::Error::Type::INVALID_VALUE)); in ConvertFromString() 133 static Expected<ScalarValue, Metadata::Error> CreatePrimitiveValue(std::string_view value, in CreatePrimitiveValue() 138 return Unexpected(res.Error()); in CreatePrimitiveValue() 143 … 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 …]
|
| /arkcompiler/runtime_core/assembler/ |
| D | meta.cpp | 27 std::optional<Metadata::Error> Metadata::ValidateSize(const std::string_view &value) const in ValidateSize() 32 return Error("Unsigned integer 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(const 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(const 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() 148 static Expected<ScalarValue, Metadata::Error> CreateValue( in CreateValue() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/16.coroutines/03.promise_class/ |
| D | p.params.yaml | 26 reject(new Error('ABC')) 42 reject(new Error('ABC')) 49 } catch (e: Error) { 63 throw new Error(s) 65 reject(new Error('ABC')) 72 } catch (e: Error) { 88 reject(new Error('A')) 112 reject(new Error('A')) 118 let e: Error = p! as Error 119 throw new Error(e.message + 'B') [all …]
|
| /arkcompiler/ets_frontend/ets2panda/test/runtime/ets/ |
| D | division-by-zero.sts | 21 } catch (error: ArithmeticError) { 28 } catch (error: ArithmeticError) { 35 } catch (error: ArithmeticError) { 42 } catch (error: ArithmeticError) { 54 } catch (error: ArithmeticError) { 61 } catch (error: ArithmeticError) { 68 } catch (error: ArithmeticError) { 75 } catch (error: ArithmeticError) { 85 } catch (error: ArithmeticError) { 91 } catch (error: ArithmeticError) { [all …]
|