Log exception where possible

This commit is contained in:
Bond_009
2018-12-16 00:48:40 +01:00
parent 22093c9e8f
commit cb8cd1ff55
2 changed files with 9 additions and 8 deletions

View File

@@ -146,14 +146,10 @@ namespace IsoMounter
public Task<IIsoMount> Mount(string isoPath, CancellationToken cancellationToken)
{
LinuxMount mountedISO;
if (MountISO(isoPath, out mountedISO))
{
if (MountISO(isoPath, out LinuxMount mountedISO)) {
return Task.FromResult<IIsoMount>(mountedISO);
}
else
{
else {
throw new IOException(String.Format(
"An error occurred trying to mount image [$0].",
isoPath