Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: SessionRemoteException Class Questions

Not trying to be argumentative, but checking for folder existence before every transfer sounds like it cause a performance hit by adding extra work for a condition that happens fairly infrequently.

Would it be possible for the assembly to throw a special Exception class when the cause is "folder not found"? Perhaps with a name something like “NoSuchFolderException”?

This kind of error is one of the few (perhaps the only?) error that we can actually do something about (i.e., create the missing folder). I'm thinking that with a special catch block that handled only one kind of error, transfers could more efficient.

Re: SessionRemoteException Class Questions

I do not understand what is broken about the documentation page.
It show the only property that the class adds on top of the standard Exception class.

The exception do not provide any more details than the error message.
The best you can do is to simply check if the directory exists before trying to upload to it.

SessionRemoteException class questions

The “Properties” link on the documentation page ( seems to be broken. It doesn’t show any properties.

Would a SessionRemoteException be thrown if a PutFileToDirectory call fails due to the remote directory not existing? How would one determine that was the cause?

If I knew the cause was “directory not found,” I’d create the directory, then retry the PutFileToDirectory call. Currently, I can't do that, because I don't know the reason for the exception.

Could you perhaps add a code example on the PutFileToDirectory page showing your recommendation on how to handle a SessionRemoteException being thrown?