Table 41. Semantic Error Messages in Siebel eScript
|
|
|
Argument argument_label either type doesn't correct or is not defined. |
function main () { fn (new Date(), new Date()); // type of the second parameter // mismatches with function // definition and cannot be // implicitly converted to // 'Number' type }
function fn (arg1: chars, arg2: Number) { TheApplication().RaiseErrorText ("fn"); } main ();
|
|
No such predefined property property_label in class object_type. |
function main () { delete "123".prop1; // prop1 is not a property of // String object. Also, because // the String object is // constructed here by implicitly // converting "123", prop1 // cannot be created dynamically. }
|
|
[] operator can only apply to Object, Buffer or Array class. |
|
The script is trying to use [] accessor to the types other than Object, Buffer or Array |
Type mismatch: L: left_type; R: right_type. |
1. function TypeMismatch() { var BC:BusComp; var MyDate:Date = new Date(); BC =MyDate; // MyDate is not the same data type // as strongly typed variable BC }
2. function fn () { var a: String; a = new Date (); //Type mismatch: strongly typed //String is assigned a Date. }
|
A value which belongs to one data type is assigned to a strongly typed variable of another data type. |
Return type is wrong. Defined return type is return_type. |
function fn (): Array { return new Date (); }
fn ();
|
The actual return type is different form the defined return type, and the actual return type cannot be implicitly converted to the defined type. |
No such label label defined. |
function fn () { break labl; // where labl is not a valid label }
fn ();
|
|
Continue out of loop. |
function ContinueOut() { var i =0 while (i<3) { i++; continue Mylabel; // Mylabel label is defined //outside of the while loop. } Mylabel: var a=1; }
|
A continue command attempts to branch to a label that is outside of a loop. |
Label redefined. |
function LabelError() { Outer: for (var i = 0; i < 5; i++) { var j = 0; Inner: while (j!=5) { j++; continue Inner; Inner: //Label Inner is //redefined. var b=1; } } }
|
There is already an existing label with the same name. |
function function_label is double defined. |
function fn () { TheApplication().RaiseErrorText ("fn"); } function fn () // second declaration of function // fn is not allowed { TheApplication().RaiseErrorText ("fn again"); }
|
|
Calling function function_label with insufficient number of arguments. |
function main () { fn (); // does not provide enough //parameters }
function fn (arg1: chars, arg2: chars) { ... }
|
|
Can't access property property_name on native type. |
function main () { var a:chars = "123"; a.m_prop = "123"; // chars is a primitive type, so it // has no properties } main ();
|
|
Object_name is an invalid object type. |
function main () { var a: Obj1 = "123"; // where Obj1 is an invalid object // type
} main ();
|
|
Indiscriminate usage of goto. |
function main () { var obj = new Object(); with (obj) { labl: TheApplication().RaiseErrorText ("in with"); } goto labl; } main ();
|
Script uses goto to attempt a branch into a with block from outside of the with block. |