1

Closed

Feature Request: throw exceptions in WSDLGenerator.cs instead of Console.WriteLine(...); return;

description

Hi.
 
Thank you for WSDLGenerator 0.0.0.6.
 
I would like to request that WSDLGenerator throw exceptions instead of Console.WriteLine(...); and then return;
 
For example, I notice that the following error is displayed in stdout, but the exit code indicates success (0):
"Invalid namespace, 'http://localhost/MyWebService' does not end with a /"   In this way, callers of WSDLGenerator can catch the exception and handle it instead of checking if the wsdl file exists or reading stdout for example.
 
Thank you.
Closed Mar 16, 2013 at 2:02 PM by stefh
Use the DLL instead of the commandline application.

comments

stefh wrote Jun 16, 2011 at 5:57 AM

A console application cannot throw a exception which you can catch, the only thing which is possible is to return an error code.

icnocop wrote Jun 16, 2011 at 7:52 AM

Hi stefh,

Sorry, I might not have been clear.

I would like to request that WSDLGeneratorCmd.WSDLGenerator (WSDLGenerator\WSDLGenerator.cs) throw exceptions instead of Console.WriteLine(...) and then return;
WSDLGeneratorCmd.Program.Main (WSDLGenerator\Program.cs) can then catch those exceptions and use Console.WriteLine(...) and set Environment.ExitCode = 1 for example.

In this way if a third party program makes use of WSDLGenerator.cs, it can correctly catch and handle errors without any code modifications.

Thank you.

wrote Feb 14, 2013 at 1:46 AM

wrote Mar 16, 2013 at 2:02 PM

wrote May 16, 2013 at 8:18 AM