Catch and log exceptions thrown by TryPrepareFolderForCallbacks#280
Conversation
|
@sanoursa I made another round of changes based on your feedback. Please let me know what you think. |
| } | ||
|
|
||
| public bool TryPrepareFolderForCallbacks(string folderPath, out string error) | ||
| public bool TryPrepareFolderForCallbacks(string folderPath, out string error, out Exception exception) |
There was a problem hiding this comment.
Minor: both of the out params are only used for tracing errors. Should this method just take an ITracer as an input param and writes out its own errors?
There was a problem hiding this comment.
both of the out params are only used for tracing errors
@sanoursa, the exception parameter is only used for tracing, but the error out param is used for both tracing and for letter the user know (on the command line) why their clone has failed.
I can update TryPrepareFolderForCallbacks to take an ITracer (and remove the out exception), but we'd still need an out error parameter.
Let me know if you think it's worth making that change.
There was a problem hiding this comment.
Discussed with @sanoursa offline and I will merge this in as-is.
Fixes #278
TryPrepareFolderForCallbackscan throw aFileNotFoundExceptionif ProjFS is not properly installed\enabled. Prior to these changes, when an exception occurred the exception would not be logged and the full call stack would be displayed to the user on the console.With these changes any exceptions thrown by
TryPrepareFolderForCallbackswill be caught and recorded to the log file.