Home
last modified time | relevance | path

Searched full:throw (Results 1 – 25 of 422) sorted by relevance

12345678910>>...17

/arkcompiler/ets_runtime/test/typeinfer/automatedcases/
DthrowStatements.ts59 throw aNumber;
64 throw aString;
71 throw aDate;
77 throw anObject;
83 throw anAny;
90 throw anOtherAny;
95 throw anUndefined;
102 throw aClass;
108 throw aGenericClass;
115 throw anObjectLiteral;
[all …]
DthrowInEnclosingStatements.ts22 throw x;
26 <T>(x: T) => { throw x;
27 AssertType(<T>(x: T) => { throw x; }, "<T>(T) => never");
39 throw y;
41 throw y;
49 throw z;
53 for (let i = 0; ;) { throw i;
57 for (let idx in {}) { throw idx;
61 do { throw null; }while(true)
68 while (j < 0) { throw j;
[all …]
DasyncIIFE.ts23 AssertType((async () => { await 10 throw new Error(); })(), "Promise<never>");
24 AssertType((async () => { await 10 throw new Error(); }), "() => Promise<never>");
25 AssertType(async () => { await 10 throw new Error(); }, "() => Promise<never>");
31 throw new Error();
DneverType.ts22 throw new Error(message);
29 throw new Error(message);
50 throw new Error();
123 throw new Error();
133 throw new Error();
202 test(() => { throw new Error(); })
203 AssertType(test(() => { throw new Error(); }), "string");
205 AssertType(() => { throw new Error(); }, "() => never");
DpromiseTypeStrictNull.ts93 throw Error();
150 throw Error();
235 const p17 = p.catch(() => {throw 1});
237 AssertType(p.catch(() => {throw 1}), "Promise<boolean>");
239 AssertType(() => {throw 1}, "() => never");
306 const p27 = p.then(() => {throw 1});
308 AssertType(p.then(() => {throw 1}), "Promise<never>");
310 AssertType(() => {throw 1}, "() => never");
384 const p37 = p.then(undefined, () => {throw 1});
386 AssertType(p.then(undefined, () => {throw 1}), "Promise<boolean>");
[all …]
/arkcompiler/ets_frontend/es2panda/test/parser/js/
Dtest-throw-statement.js17 throw 123
18 throw 123;
19 throw ''
20 throw '';
21 throw ""
22 throw "";
23 throw undefined
24 throw undefined;
25 throw null
26 throw null;
[all …]
/arkcompiler/ets_frontend/ts2panda/src/
DsyntaxChecker.ts130throw new DiagnosticError(decl.node, DiagnosticCode.Duplicate_identifier_0, jshelpers.getSourceFil…
259throw new DiagnosticError(decl.node, DiagnosticCode.Declaration_name_conflicts_with_built_in_globa…
268throw new DiagnosticError(decl.node, DiagnosticCode.Duplicate_identifier_0, sourceNode, [decl.name…
283throw new DiagnosticError(node, DiagnosticCode.Jump_target_cannot_cross_function_boundary, jshelpe…
305throw new DiagnosticError(node, DiagnosticCode.A_continue_statement_can_only_jump_to_a_label_of_an…
341 throw new DiagnosticError(node, diagnosticCode, jshelpers.getSourceFileOfNode(node));
348throw new DiagnosticError(node, DiagnosticCode.A_return_statement_can_only_be_used_within_a_functi…
359throw new DiagnosticError(node, DiagnosticCode._0_is_not_a_valid_meta_property_for_keyword_1_Did_y…
364 throw new DiagnosticError(node,
368 throw new DiagnosticError(node,
[all …]
DsyntaxCheckerForStrcitMode.ts38throw new DiagnosticError(unaryExpr, DiagnosticCode.A_delete_cannot_be_called_on_an_identifier_in_…
48 throw new DiagnosticError(node, DiagnosticCode.Octal_literals_are_not_allowed_in_strict_mode);
54throw new DiagnosticError(node, DiagnosticCode.Octal_escape_sequences_are_not_allowed_in_strict_mo…
58 throw new DiagnosticError(node, DiagnosticCode._8_and_9_are_not_allowed_in_strict_mode);
84throw new DiagnosticError(name, getStrictModeEvalOrArgumentsDiagnosticCode(contextNode), file, arg…
128throw new DiagnosticError(node, DiagnosticCode.Identifier_expected_0_is_a_reserved_word_at_the_top…
136throw new DiagnosticError(node, getStrictModeIdentifierDiagnosticCode(node), file, jshelpers.decla…
150throw new DiagnosticError(param.name, DiagnosticCode.Duplicate_identifier_0, undefined, args);
159throw new DiagnosticError(param, DiagnosticCode.use_strict_directive_cannot_be_used_with_non_simpl…
167throw new DiagnosticError(node, DiagnosticCode.A_with_statements_are_not_allowed_in_strict_mode, f…
[all …]
/arkcompiler/ets_frontend/es2panda/test/bytecode/js/destructuring/
Dtest-array-pattern-iterator-close-expected.txt26 throw.ifnotobject v10
49 throw
56 throw.ifnotobject v10
79 throw
121 throw
124 throw.ifnotobject v14
161 throw
163 throw.ifnotobject v14
166 throw
169 throw
/arkcompiler/runtime_core/tests/cts-generator/cts-template/
Dthrow.yaml35 - file-name: "throw"
37 title: Throw exception
38 description: Throw an exception located in register.
40 - sig: throw v:in:ref
51 - sig: throw v:in:ref
62 throw %s
71 - values: ['throw']
81 - sig: throw v:in:ref
93 throw %s
104 - sig: throw v:in:ref
[all …]
/arkcompiler/ets_frontend/ts2panda/src/function/
DasyncGeneratorFunctionBuilder.ts32 THROW, enumerator
163 // b. Else if received.[[Type]] is throw, then
165 pg.loadAccumulatorInt(node, ResumeMode.THROW);
168 // i. Let throw be ? GetMethod(iterator, "throw")
169 iter.getMethod("throw");
171 // ii. If throw is not undefined, then
175 …// 1. NOTE: If iterator does not have a throw method, this throw is going to terminate the yield* …
182 // not have a throw method.
183 // 6. Throw a TypeError exception.
209 // 1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_weak_map.cpp35 // 1.If NewTarget is undefined, throw a TypeError exception in WeakMapConstructor()
38 // throw type error in WeakMapConstructor()
68 // If IsCallable(adder) is false, throw a TypeError exception in WeakMapConstructor()
82 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete()
83 // 3.If S does not have a [[WeakMapData]] internal slot, throw a TypeError exception. in Delete()
104 // 2.If Type(S) is not Object, throw a TypeError exception. in Has()
105 // 3.If S does not have a [[WeakMapData]] internal slot, throw a TypeError exception. in Has()
126 // 2.If Type(S) is not Object, throw a TypeError exception. in Get()
127 // 3.If S does not have a [[WeakMapData]] internal slot, throw a TypeError exception. in Get()
149 // 2.If Type(S) is not Object, throw a TypeError exception. in Set()
[all …]
Dbuiltins_dataview.cpp37 // 1. If NewTarget is undefined, throw a TypeError exception. in DataViewConstructor()
42 // 2. If Type(buffer) is not Object, throw a TypeError exception. in DataViewConstructor()
46 // 3. If buffer does not have an [[ArrayBufferData]] internal slot, throw a TypeError exception. in DataViewConstructor()
56 // 7. If numberOffset ≠ offset or offset < 0, throw a RangeError exception. in DataViewConstructor()
61 // 8. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. in DataViewConstructor()
68 // 10. If offset > bufferByteLength, throw a RangeError exception. in DataViewConstructor()
83 // If offset+viewByteLength > bufferByteLength, throw a RangeError exception. in DataViewConstructor()
116 // 2. f Type(O) is not Object, throw a TypeError exception. in GetBuffer()
120 // 3. If O does not have a [[ViewedArrayBuffer]] internal slot, throw a TypeError exception. in GetBuffer()
140 // 2. If Type(O) is not Object, throw a TypeError exception. in GetByteLength()
[all …]
Dbuiltins_map.cpp33 // 1.If NewTarget is undefined, throw a TypeError exception in MapConstructor()
36 // throw type error in MapConstructor()
75 // 2.If Type(S) is not Object, throw a TypeError exception. in Set()
76 // 3.If S does not have a [[MapData]] internal slot, throw a TypeError exception. in Set()
97 // 2.If Type(S) is not Object, throw a TypeError exception. in Clear()
98 // 3.If S does not have a [[MapData]] internal slot, throw a TypeError exception. in Clear()
113 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete()
114 // 3.If S does not have a [[MapData]] internal slot, throw a TypeError exception. in Delete()
131 // 2.If Type(S) is not Object, throw a TypeError exception. in Has()
132 // 3.If S does not have a [[MapData]] internal slot, throw a TypeError exception. in Has()
[all …]
Dbuiltins_set.cpp35 // 1.If NewTarget is undefined, throw a TypeError exception in SetConstructor()
38 // throw type error in SetConstructor()
66 // If IsCallable(adder) is false, throw a TypeError exception in SetConstructor()
113 // 2.If Type(S) is not Object, throw a TypeError exception. in Add()
114 // 3.If S does not have a [[SetData]] internal slot, throw a TypeError exception. in Add()
134 // 2.If Type(S) is not Object, throw a TypeError exception. in Clear()
135 // 3.If S does not have a [[SetData]] internal slot, throw a TypeError exception. in Clear()
152 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete()
153 // 3.If S does not have a [[SetData]] internal slot, throw a TypeError exception. in Delete()
172 // 2.If Type(S) is not Object, throw a TypeError exception. in Has()
[all …]
Dbuiltins_weak_set.cpp34 // 1.If NewTarget is undefined, throw a TypeError exception in WeakSetConstructor()
37 // throw type error in WeakSetConstructor()
65 // If IsCallable(adder) is false, throw a TypeError exception in WeakSetConstructor()
116 // 2.If Type(S) is not Object, throw a TypeError exception. in Add()
117 // 3.If S does not have a [[WeakSetData]] internal slot, throw a TypeError exception. in Add()
123 // 4.If CanBeHeldWeakly(value) is false, throw a TypeError exception. in Add()
141 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete()
142 // 3.If S does not have a [[WeakSetData]] internal slot, throw a TypeError exception. in Delete()
164 // 2.If Type(S) is not Object, throw a TypeError exception. in Has()
165 // 3.If S does not have a [[SetData]] internal slot, throw a TypeError exception. in Has()
Dbuiltins_reflect.cpp29 // 1. If IsCallable(target) is false, throw a TypeError exception. in ReflectApply()
59 // 1. If IsConstructor(target) is false, throw a TypeError exception. in ReflectConstruct()
67 // 3. Else if IsConstructor(newTarget) is false, throw a TypeError exception. in ReflectConstruct()
93 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectDefineProperty()
117 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectDeleteProperty()
136 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectGet()
162 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectGetOwnPropertyDescriptor()
188 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectGetPrototypeOf()
204 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectHas()
222 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectIsExtensible()
[all …]
/arkcompiler/ets_frontend/es2panda/compiler/function/
DfunctionBuilder.cpp156 // .throw(value) in HandleCompletion()
160 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in HandleCompletion()
210 // b. Else if received.[[Type]] is throw, then in YieldStar()
212 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in YieldStar()
215 // i. Let throw be ? GetMethod(iterator, "throw"). in YieldStar()
216 iterator.GetMethod("throw"); in YieldStar()
218 // ii. If throw is not undefined, then in YieldStar()
222 …// 1. NOTE: If iterator does not have a throw method, this throw is going to terminate the yield* … in YieldStar()
229 // not have a throw method. in YieldStar()
230 // 6. Throw a TypeError exception. in YieldStar()
[all …]
/arkcompiler/ets_runtime/test/moduletest/asyncgenerator/
Dasyncgeneratoryieldstar.js27 throw new Error('it should not get Symbol.iterator');
34 throw reason;
49 throw new Error('abrupt completion closes iter');
56 throw new Error('Promise incorrectly fulfilled.');
/arkcompiler/ets_runtime/test/aottest/builtins_array/
Dexpect_output.txt21 throw exception
23 throw exception
25 throw exception
/arkcompiler/ets_runtime/test/aottest/throw/
Dthrow.ts18 throw "Throw Test";
25 throw 123;
/arkcompiler/runtime_core/bytecode_optimizer/tests/js/
DoptimizeTryCatch.js24 throw "null";
27 throw "max";
29 throw "min";
/arkcompiler/ets_runtime/test/moduletest/regexpcallthrow/
Dregexpcallthrow.js18 * @tc.desc:test throw in regular expressions
27 throw new Test262Error();
36 print("call exec is throw error")
/arkcompiler/ets_frontend/ts2panda/templates/
DbuiltinsMap.ts.erb53throw 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() + ">");
109throw new Error("Intrinsic can't found subcode(" + ins.mnemonic + ") ir = " + ins.toString());
/arkcompiler/ets_runtime/test/aottest/try_catch_finally/
Dtry_catch_finally.ts44 throw "ex1";
61 throw "ex1";
90 throw "ex1";
104 throw "ex1";

12345678910>>...17