Differences
This shows you the differences between the selected revisions of the page.
2011-12-29 | 2011-12-29 | ||
will reference output property from library_session_outputdatareceived, using "occurs" with events (martin) | library_sessionlocalexception + library_sessionremoteexception (martin) | ||
Line 60: | Line 60: | ||
There are two classes of operations, hence two classes of methods, atomic operations, such as ''[[library_session_open|Open]]'', ''[[library_session_open|ListDirectory]]'', ''[[library_session_executecommand1|ExecuteCommand]]'', etc; and batch operations, such as ''[[library_session_getfiles|GetFiles]]'', ''[[library_session_putfiles|PutFiles]]'', ''[[library_session_synchronizedirectories|SynchronizeDirectories]]'', etc. | There are two classes of operations, hence two classes of methods, atomic operations, such as ''[[library_session_open|Open]]'', ''[[library_session_open|ListDirectory]]'', ''[[library_session_executecommand1|ExecuteCommand]]'', etc; and batch operations, such as ''[[library_session_getfiles|GetFiles]]'', ''[[library_session_putfiles|PutFiles]]'', ''[[library_session_synchronizedirectories|SynchronizeDirectories]]'', etc. | ||
- | Methods for atomic operations throw ''[[library_sessionexception|SessionException]]'' on error. | + | Methods from both classes throw ''[[library_sessionlocalexception|SessionLocalException]]'' on error in communication with WinSCP console session. |
+ | |||
+ | Methods for atomic operations throw ''[[library_sessionremoteexception|SessionRemoteException]]'' on error originating from WinSCP console session (refered to as "failure" below). | ||
Methods for batch operations returns an instance of descendant of ''[[library_operationresultbase|OperationResultBase]]'' class (such as ''[[library_operationresult|OperationResult<T>]]'' or ''[[library_synchronizationresult|SynchronizationResult]]''). Such result class stores list of operations performed (e.g. ''OperationResult<T>.Operations'' or ''SynchronizationResult.Uploads''), and list of failures (''OperationResultBase.Failures''). | Methods for batch operations returns an instance of descendant of ''[[library_operationresultbase|OperationResultBase]]'' class (such as ''[[library_operationresult|OperationResult<T>]]'' or ''[[library_synchronizationresult|SynchronizationResult]]''). Such result class stores list of operations performed (e.g. ''OperationResult<T>.Operations'' or ''SynchronizationResult.Uploads''), and list of failures (''OperationResultBase.Failures''). | ||
- | Every structure representing operation performed may refer (e.g. ''[[library_transferargs|TransferArgs]].Error'') to one of the failures, if the failure can be explicitly associated with the operation. So often the same failure (represented by ''[[library_sessionexception|SessionException]]'') will be referenced twice in the results. | + | Every structure representing operation performed may refer (e.g. ''[[library_transferargs|TransferArgs]].Error'') to one of the failures, if the failure can be explicitly associated with the operation. So often the same failure (represented by ''[[library_sessionremoteexception|SessionRemoteException]]'') will be referenced twice in the results. |
But there can be failures that cannot be explicitly associated with any operation represented in results. An example is an error when listing contents of remote directory to determine list of files to downloads. The listing is not represented in the results, so the failure will be included only in a generic list of failures. | But there can be failures that cannot be explicitly associated with any operation represented in results. An example is an error when listing contents of remote directory to determine list of files to downloads. The listing is not represented in the results, so the failure will be included only in a generic list of failures. |