public OcLayerException(string message, [CanBeNull] Exception exception, string resourceName, OcLayerType layerType, string layerTypeName, IOcRequest request = null, [CanBeNull] Type entityType = null, [CanBeNull] object entity = null, [CanBeNull] object entityKey = null, [CallerMemberName] string callerName = null, [CallerFilePath] string callerFile = null, [CallerLineNumber] int callerLine = 0)
            : base(string.IsNullOrWhiteSpace(message) ? "Unspecified Layer Routing Error" : message, exception, entityType, entity, entityKey, callerName, callerFile, callerLine)
        {
            ResourceName = resourceName;
            if (ResourceName != null)
            {
                PropertySet(nameof(ResourceName), ResourceName);
            }

            LayerType = layerType;
            if (LayerType != OcLayerType.Unknown)
            {
                PropertySet(nameof(LayerType), LayerType);
            }

            LayerTypeName = layerTypeName;
            if (LayerTypeName != null)
            {
                PropertySet(nameof(LayerTypeName), LayerTypeName);
            }

            Request = request;
            if (Request != null)
            {
                PropertySet(nameof(Request), Request);
            }
        }
        protected OcLayerException NewConstructorException(string message, [CanBeNull] Exception exception, string resourceName, OcLayerType layerType, string layerTypeName, IOcRequest request = null, [CallerMemberName] string callerName = null, [CallerFilePath] string callerFile = null, [CallerLineNumber] int callerLine = 0)
        {
            // ReSharper disable ExplicitCallerInfoArgument
            var ex = new OcLayerException($"Error constructing {GetType().FriendlyName()}" + (string.IsNullOrWhiteSpace(message) ? "" : message), exception, resourceName, layerType, layerTypeName, request, null, null, null, callerName, callerFile, callerLine);

            // ReSharper restore ExplicitCallerInfoArgument
            Request.ResponseMessages.Add(OcApiMessageType.Error, $"Layer Constructor Exception: {ex.Summary}");
            return(ex);
        }