Added error handling when a folder is moved to a location which would cause there to be two sub-folders with the same name.
This commit is contained in:
parent
90d354fe6d
commit
0945b75d11
@ -1247,7 +1247,9 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("Folder.DataPortal_Update", ex);
|
||||
if (_MyLog.IsErrorEnabled)
|
||||
if(!ex.Message.Contains("Cannot insert duplicate key row in object 'dbo.Folders' with unique index 'IX_UniqueChildFolders'"))
|
||||
_MyLog.Error("Folder.DataPortal_Update", ex);
|
||||
_ErrorMessage = ex.Message;
|
||||
if (!ex.Message.EndsWith("has been edited by another user.")) throw ex;
|
||||
}
|
||||
@ -1299,7 +1301,9 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("Folder.SQLUpdate", ex);
|
||||
if (_MyLog.IsErrorEnabled)
|
||||
if(!ex.Message.Contains("Cannot insert duplicate key row in object 'dbo.Folders' with unique index 'IX_UniqueChildFolders'"))
|
||||
_MyLog.Error("Folder.SQLUpdate", ex);
|
||||
_ErrorMessage = ex.Message;
|
||||
if (!ex.Message.EndsWith("has been edited by another user.")) throw ex;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user