This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Do-nothing variable required for FireInformation below | |
bool fireagain = true; | |
// Log output to SSIS log | |
if (returnVal != 0 || errStr.Length > 0) // Error | |
{ | |
if (errStr.Length > 0) | |
Dts.Events.FireError(0, "WinSCP Exception", errStr.Replace("'", "\"").Replace("--", " - "), "", 0); | |
if (outStr.Length > 0) | |
Dts.Events.FireError(0, "WinSCP error", "A WinSCP error has occurred. The full output stack follows: " + outStr.Replace("'", "\"").Replace("--", " - "), "", 0); | |
} | |
else // No error | |
Dts.Events.FireInformation(0, "WinSCP output", outStr, string.Empty, 0, ref fireagain); | |
Dts.TaskResult = (returnVal != 0) ? (int)ScriptResults.Failure : (int)ScriptResults.Success; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment