|
@@ -441,6 +441,7 @@ BEGIN
|
|
r := NEW Files.Reader(file, 0);
|
|
r := NEW Files.Reader(file, 0);
|
|
NEW(newContext, context.in, r, context.out, context.error, context.caller);
|
|
NEW(newContext, context.in, r, context.out, context.error, context.caller);
|
|
Commands.Activate("System.DoCommands", newContext, {Commands.Wait}, res, msg);
|
|
Commands.Activate("System.DoCommands", newContext, {Commands.Wait}, res, msg);
|
|
|
|
+ context.result := res;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Error: no such file: "); context.error.String(filename); context.error.Ln;
|
|
context.error.String("Error: no such file: "); context.error.String(filename); context.error.Ln;
|
|
END;
|
|
END;
|
|
@@ -547,6 +548,7 @@ BEGIN
|
|
Commands.Activate(command^, newContext, {Commands.Wait}, res, msg);
|
|
Commands.Activate(command^, newContext, {Commands.Wait}, res, msg);
|
|
|
|
|
|
IF res # Commands.Ok THEN
|
|
IF res # Commands.Ok THEN
|
|
|
|
+ context.result := res;
|
|
context.error.String("System.DoCommands: Command: '");
|
|
context.error.String("System.DoCommands: Command: '");
|
|
context.error.String(command^); context.error.String("', parameters: ");
|
|
context.error.String(command^); context.error.String("', parameters: ");
|
|
IF paramString = NIL THEN
|
|
IF paramString = NIL THEN
|
|
@@ -611,6 +613,7 @@ BEGIN
|
|
DEC(nofTimes);
|
|
DEC(nofTimes);
|
|
END;
|
|
END;
|
|
IF (res # Commands.Ok) THEN
|
|
IF (res # Commands.Ok) THEN
|
|
|
|
+ context.result := res;
|
|
context.out.String("Error in command '"); context.out.String(command); context.out.String("', res: ");
|
|
context.out.String("Error in command '"); context.out.String(command); context.out.String("', res: ");
|
|
context.out.Int(res, 0); context.out.Ln;
|
|
context.out.Int(res, 0); context.out.Ln;
|
|
END;
|
|
END;
|
|
@@ -682,6 +685,7 @@ BEGIN
|
|
UNTIL (reader.res # Streams.Ok);
|
|
UNTIL (reader.res # Streams.Ok);
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Could not open file "); context.error.String(filename); context.error.Ln;
|
|
context.error.String("Could not open file "); context.error.String(filename); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END ShowFile;
|
|
END ShowFile;
|