Better exception message on media type save
(cherry picked from commit d2efcc822d)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
2024681a26
commit
cafd07fd01
@@ -390,6 +390,11 @@ namespace Umbraco.Core.Services.Implement
|
||||
if (string.IsNullOrWhiteSpace(item.Name))
|
||||
throw new ArgumentException("Cannot save item with empty name.");
|
||||
|
||||
if (item.Name != null && item.Name.Length > 255)
|
||||
{
|
||||
throw new InvalidOperationException("Name cannot be more than 255 characters in length.");
|
||||
}
|
||||
|
||||
scope.WriteLock(WriteLockIds);
|
||||
|
||||
// validate the DAG transform, within the lock
|
||||
|
||||
Reference in New Issue
Block a user