Commit aa8dc61b by Mac Stephens

remove error message test console logs, update log level for broadcastall

parent fad3b6f3
...@@ -83,13 +83,13 @@ end; ...@@ -83,13 +83,13 @@ end;
procedure TWsDataModel.BroadcastAll; procedure TWsDataModel.BroadcastAll;
begin begin
Logger.Log(3, 'WsDataModel: BroadcastAll initiated'); Logger.Log(5, 'WsDataModel: BroadcastAll initiated');
try FBroadcast(BuildBadgeCountsJson); except on E: Exception do Logger.Log(2, 'WsDataModel BADGE_COUNTS error: ' + E.Message); end; try FBroadcast(BuildBadgeCountsJson); except on E: Exception do Logger.Log(2, 'WsDataModel BADGE_COUNTS error: ' + E.Message); end;
try FBroadcast(BuildUnitMapJson); except on E: Exception do Logger.Log(2, 'WsDataModel UNIT_MAP error: ' + E.Message); end; try FBroadcast(BuildUnitMapJson); except on E: Exception do Logger.Log(2, 'WsDataModel UNIT_MAP error: ' + E.Message); end;
try FBroadcast(BuildComplaintMapJson); except on E: Exception do Logger.Log(2, 'WsDataModel COMPLAINT_MAP error: ' + E.Message); end; try FBroadcast(BuildComplaintMapJson); except on E: Exception do Logger.Log(2, 'WsDataModel COMPLAINT_MAP error: ' + E.Message); end;
try FBroadcast(BuildUnitListJson); except on E: Exception do Logger.Log(2, 'WsDataModel UNIT_LIST error: ' + E.Message); end; try FBroadcast(BuildUnitListJson); except on E: Exception do Logger.Log(2, 'WsDataModel UNIT_LIST error: ' + E.Message); end;
try FBroadcast(BuildComplaintListJson); except on E: Exception do Logger.Log(2, 'WsDataModel COMPLAINT_LIST error: ' + E.Message); end; try FBroadcast(BuildComplaintListJson); except on E: Exception do Logger.Log(2, 'WsDataModel COMPLAINT_LIST error: ' + E.Message); end;
Logger.Log(3, 'WsDataModel: BroadcastAll end'); Logger.Log(5, 'WsDataModel: BroadcastAll end');
end; end;
function TWsDataModel.BuildBadgeCountsJson: string; function TWsDataModel.BuildBadgeCountsJson: string;
......
...@@ -80,12 +80,9 @@ procedure TDMConnection.InitApp(SuccessProc: TSuccessProc; ...@@ -80,12 +80,9 @@ procedure TDMConnection.InitApp(SuccessProc: TSuccessProc;
if Config.WsUrl <> '' then if Config.WsUrl <> '' then
FWsUrl := Config.WsUrl; FWsUrl := Config.WsUrl;
console.log('InitApp: opening AuthConnection');
AuthConnection.Open( AuthConnection.Open(
procedure procedure
begin begin
console.log('InitApp: AuthConnection opened');
VerifyVersion(SuccessProc); VerifyVersion(SuccessProc);
end); end);
end; end;
...@@ -97,7 +94,6 @@ end; ...@@ -97,7 +94,6 @@ end;
procedure TDMConnection.VerifyVersion(SuccessProc: TSuccessProc); procedure TDMConnection.VerifyVersion(SuccessProc: TSuccessProc);
begin begin
console.log('VerifyVersion: calling server');
XDataWebClient1.Connection := AuthConnection; XDataWebClient1.Connection := AuthConnection;
XDataWebClient1.RawInvoke('IAuthService.VerifyVersion', [clientVersion], XDataWebClient1.RawInvoke('IAuthService.VerifyVersion', [clientVersion],
...@@ -106,7 +102,6 @@ begin ...@@ -106,7 +102,6 @@ begin
jsonResult: TJSObject; jsonResult: TJSObject;
error: string; error: string;
begin begin
console.log('VerifyVersion: response received');
jsonResult := TJSObject(Response.Result); jsonResult := TJSObject(Response.Result);
if Assigned(jsonResult) and jsonResult.HasOwnProperty('error') then if Assigned(jsonResult) and jsonResult.HasOwnProperty('error') then
...@@ -121,8 +116,7 @@ begin ...@@ -121,8 +116,7 @@ begin
end, end,
procedure(Error: TXDataClientError) procedure(Error: TXDataClientError)
begin begin
console.log('VerifyVersion ERROR: ' + Error.ErrorMessage); TFViewErrorPage.Display(Error.ErrorMessage);
TFViewErrorPage.Display('Unable to connect to the database.');
end); end);
end; end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment