From ebc482b7b214175bf6024e287f798dcb4358addc Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 27 Apr 2020 16:22:34 +0200 Subject: [PATCH] Windream: Log if object does not exist --- Modules.Windream/Windream.vb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Modules.Windream/Windream.vb b/Modules.Windream/Windream.vb index 50866a63..7699754f 100644 --- a/Modules.Windream/Windream.vb +++ b/Modules.Windream/Windream.vb @@ -766,15 +766,15 @@ Public Class Windream 'If UsesDriveLetter Then ' Remove Driveletter eg. W:\ If oNormalizedPath.StartsWith($"{ClientDriveLetter}:\") Then - _logger.Debug($"Replacing ClientDriveLetter: [{ClientDriveLetter}]") - oNormalizedPath = oNormalizedPath.Substring(ClientDriveLetter.Length + 2) - End If + _logger.Debug($"Replacing ClientDriveLetter: [{ClientDriveLetter}]") + oNormalizedPath = oNormalizedPath.Substring(ClientDriveLetter.Length + 2) + End If 'Else If oNormalizedPath.ToLower.StartsWith(ClientBasePath.ToLower) Then - _logger.Debug($"Replacing ClientBasePath: [{ClientBasePath}]") - ' Remove Windream Base Path eg. \\windream\objects\ - oNormalizedPath = oNormalizedPath.Substring(ClientBasePath.Length - 1) - End If + _logger.Debug($"Replacing ClientBasePath: [{ClientBasePath}]") + ' Remove Windream Base Path eg. \\windream\objects\ + oNormalizedPath = oNormalizedPath.Substring(ClientBasePath.Length - 1) + End If 'End If oNormalizedPath = oNormalizedPath.Replace("\\", "\") @@ -1463,6 +1463,7 @@ Public Class Windream End If If TestObjectExists(ObjectName, ObjectType) = False Then + _logger.Warn("GetObjectByName: Object {0} does not exist!", ObjectName) Return Nothing End If @@ -1481,6 +1482,7 @@ Public Class Windream End If If TestObjectExists(ObjectName, ObjectType) = False Then + _logger.Warn("GetObjectByPath: Object {0} does not exist!", ObjectName) Return Nothing End If