Skip to content

Commit

Permalink
Changed parameter order on RuntimeError
Browse files Browse the repository at this point in the history
  • Loading branch information
lvcabral committed May 1, 2024
1 parent 0c6d640 commit 5fd0b80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export class RuntimeError extends BrsError {
constructor(
readonly errCode: ErrorCode,
location: Location,
readonly backTrace?: TracePoint[],
readonly extraFields?: Map<string, BrsType>,
readonly backTrace?: TracePoint[]
) {
super(errCode.message, location, backTrace);
}
Expand Down
2 changes: 1 addition & 1 deletion src/interpreter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ export class Interpreter implements Expr.Visitor<BrsType>, Stmt.Visitor<BrsType>
errCode = RuntimeErrorCode.MalformedThrow;
errCode.message = `Thrown value neither string nor roAssociativeArray.`;
}
throw new RuntimeError(errCode, statement.location, extraFields, this._stack.slice());
throw new RuntimeError(errCode, statement.location, this._stack.slice(), extraFields);
// Validation Functions
function validateErrorNumber(element: BrsType, errCode: ErrorCode): ErrorCode {
if (element instanceof Int32) {
Expand Down

0 comments on commit 5fd0b80

Please sign in to comment.