Fix exceptions (more explicit)

This commit is contained in:
Stephan
2016-09-07 13:24:49 +02:00
parent 3fc76f61d0
commit 36188f00b0
2 changed files with 2 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ namespace Umbraco.Core.Cache
value = result.Value; // will not throw (safe lazy)
var eh = value as ExceptionHolder;
if (eh != null) throw eh.Exception; // throw once!
if (eh != null) throw new Exception("Exception while creating a value.", eh.Exception); // throw once!
return value;
}

View File

@@ -132,7 +132,7 @@ namespace Umbraco.Core.Services
case UmbracoObjectTypes.ROOT:
case UmbracoObjectTypes.Unknown:
default:
throw new NotSupportedException();
throw new NotSupportedException("Unsupported object type (" + umbracoObjectType + ").");
}
}
});