mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: MacCloud/DropBox: add TLogUtil.logError()
This commit is contained in:
parent
ca3dfa26f2
commit
8d01df8ed7
5 changed files with 15 additions and 9 deletions
|
|
@ -357,7 +357,7 @@ var
|
|||
message:= 'DropBox Error';
|
||||
if e.Message <> EmptyStr then
|
||||
message:= message + ': ' + e.Message;
|
||||
TLogUtil.log( 6, message );
|
||||
TLogUtil.logError( message );
|
||||
end;
|
||||
|
||||
begin
|
||||
|
|
@ -604,7 +604,7 @@ function TDropBoxAuthPKCESession.getAccessToken: String;
|
|||
end;
|
||||
except
|
||||
on e: EDropBoxTokenException do begin
|
||||
TLogUtil.log( 6, 'Token Error: ' + e.ClassName + ': ' + e.Message );
|
||||
TLogUtil.logError( 'Token Error: ' + e.ClassName + ': ' + e.Message );
|
||||
_token.invalid;
|
||||
self.authorize;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ procedure TMiniHttpConnectionDataDelegate.cancelConnection(
|
|||
begin
|
||||
_state:= TMiniHttpConnectionState.aborted;
|
||||
_result.resultCode:= -1;
|
||||
TLogUtil.log( 6, 'HttpClient: Connection Canceled in ' + name.UTF8String );
|
||||
TLogUtil.logError( 'HttpClient: Connection Canceled in ' + name.UTF8String );
|
||||
connection.cancel;
|
||||
CFRunLoopStop( _runloop );
|
||||
end;
|
||||
|
|
@ -409,11 +409,11 @@ begin
|
|||
_state:= TMiniHttpConnectionState.failed;
|
||||
_processor.complete( _result.response, error );
|
||||
|
||||
TLogUtil.log( 6, 'HttpClient connection_didFailWithError !!!' );
|
||||
TLogUtil.logError( 'HttpClient connection_didFailWithError !!!' );
|
||||
if Assigned(error) then begin
|
||||
TLogUtil.log( 6, 'error.code=' + IntToStr(error.code) );
|
||||
TLogUtil.log( 6, 'error.domain=' + error.domain.UTF8String );
|
||||
TLogUtil.log( 6, 'error.description=' + error.description.UTF8String );
|
||||
TLogUtil.logError( 'error.code=' + IntToStr(error.code) );
|
||||
TLogUtil.logError( 'error.domain=' + error.domain.UTF8String );
|
||||
TLogUtil.logError( 'error.description=' + error.description.UTF8String );
|
||||
end;
|
||||
|
||||
_result.resultCode:= -1;
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ begin
|
|||
self.propertyView.updateConnectStatus;
|
||||
except
|
||||
on e: Exception do begin
|
||||
TLogUtil.log( 6, 'in TCloudOptionsWindow: ' + e.Message );
|
||||
TLogUtil.logError( 'in TCloudOptionsWindow: ' + e.Message );
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ end;
|
|||
|
||||
class function TMacCloudUtil.exceptionToResult( const e: Exception ): Integer;
|
||||
begin
|
||||
TLogUtil.log( msgtype_importanterror, e.ClassName + ': ' + e.Message );
|
||||
TLogUtil.logError( e.ClassName + ': ' + e.Message );
|
||||
|
||||
if e is EAbort then
|
||||
Result:= FS_FILE_USERABORT
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ type
|
|||
class procedure setLogProc( const logProc: TLogProc );
|
||||
class procedure log( const MsgType: Integer; const message: String );
|
||||
class procedure logInformation( const message: String );
|
||||
class procedure logError( const message: String );
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
|
@ -372,6 +373,11 @@ begin
|
|||
log( 3, message );
|
||||
end;
|
||||
|
||||
class procedure TLogUtil.logError(const message: String);
|
||||
begin
|
||||
log( 6, message );
|
||||
end;
|
||||
|
||||
{ TFakeStringDictonary }
|
||||
|
||||
constructor TFakeStringDictonary.Create;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue