Colleagues,
Going through the existing (and working) program came across the following code (it's in C#, though, but in the same .NET, so what's a slight difference in syntax? ;-) ):
Throwing Exception is not the same as handling exception, say, with Try-Catch-End Try construct ("But of course!" - Q in James Bond films ).
And in this code, handling error this is not: the next line is not Return or anything like that, just another valid command:
So, what may be the purpose of throwing Exception without any following action?
Regards,
Ilya
Going through the existing (and working) program came across the following code (it's in C#, though, but in the same .NET, so what's a slight difference in syntax? ;-) ):
Code:
if (!Directory.Exists(outputFolder)) throw new Exception(String.Format("Output folder '{0}' not found.", outputFolder))
Throwing Exception is not the same as handling exception, say, with Try-Catch-End Try construct ("But of course!" - Q in James Bond films ).
And in this code, handling error this is not: the next line is not Return or anything like that, just another valid command:
Code:
string[] inputFiles = ctx.getFiles(RepositoryTrunk.Run, "*.pdf")
So, what may be the purpose of throwing Exception without any following action?
Regards,
Ilya