Topic "Feature: Add More Exit Codes"

Author Message
tperk

Guest


This feature request would affect WinSCP.com.

When WinSCP or a script fails the exit code is 1 instead of 0. If the user wants to know how the script failed, they must grep the output or parse the XML log. Depending on the environment, this can be somewhat difficult. IMHO, it would be beneficial to have more error codes, so that user can immediately know why their script has failed.

Maybe three exit codes could be used: 0 for normal, 1 for SSH/SFTP related errors (network, protocol, etc), and 2 for script errors (bad command syntax and/or bad exit codes from "call"s). Something like that.
tperk

Guest


Also, it would be nice if errors were written to stderr.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Well, I'm not sure the additional exit codes are useful enough to justify that the change possible breaks scripts of many users.

Suggestion to print errors on stderr is good. But again, probably optionally only. I have to think about it.

Add to tracker:
https://winscp.net/tracker/show_bug.cgi?id=742
https://winscp.net/tracker/show_bug.cgi?id=741
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License