Differences
This shows you the differences between the selected revisions of the page.
| 2014-07-28 | 2014-10-24 | ||
| 5.6 bug 160 webdav (martin) | 5.6.2 Bug 1225: An ExitCode property added to CommandExecutionResult in .NET assembly and an exitcode tag added to XML logging. (martin) | ||
| Line 16: | Line 16: | ||
| ==== Return Value ==== | ==== Return Value ==== | ||
| - | ''[[library_commandexecutionresult|CommandExecutionResult]]'' with command output. | + | ''[[library_commandexecutionresult|CommandExecutionResult]]'' with command output. See also [[library_session#results|Capturing results of operations]]. |
| ===== Exceptions ===== | ===== Exceptions ===== | ||
| Line 22: | Line 22: | ||
| | InvalidOperationException | Session is not opened. | | | InvalidOperationException | Session is not opened. | | ||
| | [[library_sessionlocalexception|SessionLocalException]] | Error communicating with ''[[executables#winscp.com|winscp.com]]''. \\ See the exception documentation for details. | | | [[library_sessionlocalexception|SessionLocalException]] | Error communicating with ''[[executables#winscp.com|winscp.com]]''. \\ See the exception documentation for details. | | ||
| - | | [[library_sessionremoteexception|SessionRemoteException]] | Session has failed. \\ Command has failed. \\ See the exception documentation for details. | | + | | [[library_sessionremoteexception|SessionRemoteException]] | Session has failed. \\ Command has failed (Prior to 5.6.2 beta only. Since 5.6.2 beta, use ''CommandExecutionResult.Check''). &beta \\ See the exception documentation for details. | |
| | TimeoutException | Timeout waiting for ''winscp.com'' to respond. | | | TimeoutException | Timeout waiting for ''winscp.com'' to respond. | | ||
| Line 69: | Line 69: | ||
| string.Format("mysqldump --opt -u {0} --password={1} --all-databases | gzip > {2}", | string.Format("mysqldump --opt -u {0} --password={1} --all-databases | gzip > {2}", | ||
| dbUsername, dbPassword, tempFilePath); | dbUsername, dbPassword, tempFilePath); | ||
| - | session.ExecuteCommand(dumpCommand); | + | // Prior to 5.6.2 beta, do not use Check() &beta |
| + | ················session.ExecuteCommand(dumpCommand).Check(); | ||
| // Download the database dump | // Download the database dump | ||
| Line 118: | Line 119: | ||
| String.Format("mysqldump --opt -u {0} --password={1} --all-databases | gzip > {2}", _ | String.Format("mysqldump --opt -u {0} --password={1} --all-databases | gzip > {2}", _ | ||
| dbUsername, dbPassword, tempFilePath) | dbUsername, dbPassword, tempFilePath) | ||
| - | mySession.ExecuteCommand(dumpCommand) | + | ' Prior to 5.6.2 beta, do not use Check() &beta |
| + | ················mySession.ExecuteCommand(dumpCommand).Check() | ||
| ' Download the database dump | ' Download the database dump | ||
| Line 167: | Line 169: | ||
| ("mysqldump --opt -u {0} --password={1} --all-databases | gzip > {2}" -f | ("mysqldump --opt -u {0} --password={1} --all-databases | gzip > {2}" -f | ||
| $dbUsername, $dbPassword, $tempFilePath) | $dbUsername, $dbPassword, $tempFilePath) | ||
| - | $session.ExecuteCommand($dumpCommand) | + | # Prior to 5.6.2 beta, do not use Check() &beta |
| + | ········$session.ExecuteCommand($dumpCommand).Check() | ||
| # Download the database dump | # Download the database dump | ||