Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Image Url property catching validation errors.
namespace MyWebsite.PropertyTypes
{
using System;
using System.IO;
using EPiServer.SpecializedProperties;
using log4net;
public class PropertyDCImageUrl : PropertyImageUrl
{
private static ILog logger = LogManager.GetLogger(typeof(PropertyDCImageUrl));
protected override void ValidateUri(Uri uri)
{
try
{
base.ValidateUri(uri);
}
catch (FileNotFoundException ex)
{
// Log this error.
logger.Warn(ex.Message, ex);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.