• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Estrelica
    • Core
    • CoreConfig
    • CoreConfig.Settings
  • Estrelica.Archer.AccessControl
    • AccessControlEdit
    • AccountStatus
    • ContactSubType
    • ContactType
    • IArcherGroup
    • IArcherGroupEdit
    • IArcherRole
    • IArcherRoleEdit
    • IArcherUser
    • IArcherUserEdit
    • ISecurityParameter
    • IUserContact
    • IUserProvider
    • UserType
  • Estrelica.Archer.Content
    • ArcherContentExtensions
    • ContentFilterHelper
    • ContentReportOptions
    • ContentSearchOptions
    • ContentSource
    • ContentType
    • CurrentDateOperator
    • DatafeedHistoryStatus
    • DatafeedStatus
    • DatafeedType
    • DateOffsetOperator
    • DateValueOperator
    • DisplayFieldExtensions
    • EqualityOperator
    • FieldHistoryAuditType
    • HistoryAuditType
    • IAdvancedWorkflowAudit
    • IArcherContent
    • IArcherContentAccess
    • IArcherContentEdit
    • IArcherContentIdQuery
    • IArcherDateFieldQuery
    • IArcherDocument
    • IArcherMembershipQuery<T>
    • IArcherNumericFieldQuery
    • IArcherRecord
    • IArcherRecordQuery
    • IArcherReport
    • IArcherTextFieldQuery
    • IArcherUserGroupFieldQuery
    • IArcherValuesListQuery
    • IContentHistory
    • IContentInformation
    • IContentReport
    • IContentReportOptions
    • IContentUpdateInformation
    • ICrossReferencedRecordsSelectionEdit
    • IDatafeed
    • IDatafeedHistory
    • IDatafeedHistoryMessage
    • IDatafeedRecordCount
    • IDateValueEdit
    • IDisplayField
    • IDocumentSelectionEdit
    • IEditableField
    • IExternalLink
    • IExternalLinkEdit
    • IExternalLinksSelectionEdit
    • IFieldAudit
    • IFieldHistory
    • IFieldHistoryEx
    • IFieldQuery
    • IFieldValueEdit<T>
    • IHistoryAudit
    • INumericValueEdit
    • IObjectValue
    • IReferencedRecordsSelection
    • IReferencedRecordsSelectionEdit
    • ISearchDisplayFieldOptions
    • ISearchOptions
    • ISignatureAudit
    • IStatisticsReport
    • ISubEditableField
    • ISystemUpdateInformation
    • ITextValueEdit
    • IUserGroupListSelection
    • IUserGroupListSelectionEdit
    • IValuesListBaseSelection
    • IValuesListBaseSelectionEdit
    • IValuesListSelection
    • IValuesListSelectionEdit
    • IValuesListSingleSelection
    • IValuesListSingleSelectionEdit
    • IWorkflowAction
    • IWorkflowNode
    • LastUpdatedPreference
    • NumericRangeOperator
    • RecordCountType
    • RecordStatus
    • ReportSource
    • SortField
    • SortType
    • ValueOperator
    • ValuesOperator
    • WorkflowAuditActionType
  • Estrelica.Archer.Entity
    • ArcherEntityExtensions
    • ASOStatus
    • EntityType
    • IArcherAliasableEntity
    • IArcherAliasedEntity
    • IArcherASOEntity
    • IArcherASONamedEntity
    • IArcherBase
    • IArcherContentUpdateInfoEntity
    • IArcherDescribableEntity
    • IArcherDescribedEntity
    • IArcherEntity
    • IArcherEntityBase
    • IArcherGuidEntity
    • IArcherNameableEntity
    • IArcherNamedEntity
    • IArcherUpdateInfoEntity
    • IEditableArcherEntity
    • IUpdateInformation
    • SourceAttribute
    • UpstreamPropertyAttribute
  • Estrelica.Archer.Events
    • EventActionLayoutType
    • EventActionType
    • EventDateActionType
    • EventItemActionType
    • EventSectionActionType
    • IEventAction
    • IEventRule
    • ISetDateOption
  • Estrelica.Archer.Layouts
    • ILayout
    • ILayoutEntity
    • ILayoutItem
    • ILayoutSection
    • ILayoutTab
    • LayoutItemType
    • LayoutMemberType
    • LayoutSectionType
    • LayoutTabType
  • Estrelica.Archer.Metadata
    • ArcherMetadataExtensions
    • FilterConditionType
    • FilterCriteriaOperatorType
    • IArcherApplication
    • IArcherLevel
    • IArcherModule
    • IArcherQuestionnaire
    • IArcherSolution
    • IArcherSubForm
    • IArcherValuesList
    • IArcherValuesListValue
    • IFilterCondition
    • IFilterCriteria
    • ILevelFilter
    • ILevelFilterValue
    • IModuleOwner
    • IModuleOwnerGroup
    • IModuleOwnerUser
    • IModuleReference
    • INumericRange
    • INumericRangeValue
    • IQuestionnaireRule
    • ModuleClass
    • ModuleStatus
    • ModuleType
    • QuestionnaireRuleType
    • ReportType
    • Timezone
    • ValuesListType
    • ValueSortType
  • Estrelica.Archer.Metadata.Field
    • ArcherFieldExtensions
    • DefaultDateType
    • ExternalLinkProtocol
    • FieldEncryptionState
    • FieldType
    • IArcherField
    • IAssetResponsibilitiesField
    • IAttachmentField
    • IAvailableUserGroupSelections
    • IBaseDateField
    • ICalculatedValuesListField
    • IContentAccessHistoryField
    • ICrossApplicationStatusTrackingField
    • ICrossModuleStatusTrackingField
    • ICrossReferenceField
    • IDateField
    • IDiscussionField
    • IDocumentField
    • IExternalLinksField
    • IFirstPublishedField
    • IGroupPermission
    • IHistoryLogField
    • IImageField
    • IIPAddressField
    • ILastUpdatedField
    • IMatrixField
    • ImplementsAPIKey
    • ImplementsFieldTypeAttribute
    • IMultipleReferenceDisplayField
    • INumericField
    • IPermissionInheritance
    • IQuestionnaireReferenceField
    • IRecordStatusField
    • IReferenceField
    • IRelatedRecordsField
    • IRiskAssessmentField
    • ISchedulerField
    • ISubformField
    • ITechnologiesListField
    • ITechnologyVersionsListField
    • ITextField
    • ITrackingIDField
    • IUserGroupListField
    • IUserPermission
    • IValuesListField
    • IVotingField
    • SystemFieldType
    • UserGroupType
    • VotingType
  • Estrelica.Archer.Metadata.Field.Properties
    • DisplayControl
    • FieldLayoutFormat
    • IAdvancedDisplayOption
    • IAdvancedDisplayProperty
    • IAllowLookupProperty
    • IAllowSortingProperty
    • IColumnCountProperty
    • IDisplayControlProperty
    • IDisplayInHeaderProperty
    • IEncryptionStateProperty
    • IFieldValidationTypeProperty
    • IHeightWidthProperty
    • IIncludeTimeInformationProperty
    • IIncludeUserInformationProperty
    • IIsAuditEnabledProperty
    • IIsBulkCreateEnabledProperty
    • IIsBulkUpdateEnabledProperty
    • IIsCalculatedProperty
    • IIsEditableGridDisplayProperty
    • IIsEditableInSearchProperty
    • IIsEncryptedProperty
    • IIsFindEnabledProperty
    • IIsKeyProperty
    • IIsQuestionProperty
    • IIsRequiredProperty
    • IIsRestrictedToLevelProperty
    • IIsSupressedProperty
    • IIsTrendingEnabledProperty
    • IIsUniqueProperty
    • ILinkProperty
    • ILookupReportProperty
    • IMaxAttachmentsAllowedProperty
    • IMaxFileSizeProperty
    • IMaximumSelectionProperty
    • IMaxIntValueProperty
    • IMaxLongValueProperty
    • IMinAttachmentsAllowedProperty
    • IMinimumSelectionProperty
    • IMinIntValueProperty
    • IMinLongValueProperty
    • IMinMaxSelectionProperty
    • IPrefixProperty
    • ISuffixProperty
    • ITrendingDurationProperty
    • ITrendingDurationTypeProperty
    • MatrixAxis
    • NegativeDisplayType
  • Estrelica.Archer.Metadata.Properties
    • IIsDeprecatedProperty
    • IIsDirectToEditEnabledProperty
    • IIsMobileEnabledProperty
    • IIsNotificationProperty
    • IIsTaskManagementEnabledProperty
    • IIsWaveEnabledProperty
    • IKeepLicensedProperty
    • ISearchViewProperty
  • Estrelica.Archer.Utility
    • APIExceptionExtensions
    • APIPreference
    • APISource
    • ArcherAPIException
    • ArcherEntitySerializer
    • BaseDataWrapper<K>
    • CachedResolver
    • DictionaryDataWrapper<K>
    • DomainFormat
    • EditUtilities
    • ExtensionsUnavailableException
    • FilterCriteriaHelper
    • IAccessResolver
    • IAPIFacade
    • IArcherRestAPI
    • IArcherSoapAPI
    • IArcherUndocumentedAPI
    • ICastleHillExtendedAPI
    • IContentResolver
    • ILayoutResolver
    • IMetadataResolver
    • IReportResolver
    • IValueAccessor
    • ObjectDataWrapper<T, K>
    • ObjectKeyAttribute
    • ValuesListChangeEvent
    • ValuesListChangeEventArgs
  • Estrelica.Interfaces
    • IArcherAuthProvider
    • ICacheProvider
    • IClearable
    • IDatabaseAuthProvider
    • IEditable
    • IEditable<V>
    • IEditableCollection<V>
    • IEditableEnumerable<V>
    • IEditableFieldSelection<V>
    • IEditableInterface<I>
    • IEntityResolver
    • IExtendedAPIAuthProvider
    • IHttpClientAccessor
    • ILogCleanup
    • ILogSubscriber
    • InvalidateEntity<K>
    • InvalidateEntityEventArgs<K>
    • IRecordAccess
    • IRecordAccess<T>
    • IResolverProvider
    • ISessionProvider
    • ISystemUpdateable
    • ITrafficCounter
    • LogLevel
  • Estrelica.Logging
    • BaseLogger
    • ConsoleLogger
    • FileLogger
    • FileLogger.TimestampFormat
    • Logger
    • TraceLogger
  • Estrelica.Utility
    • Arguments
    • BaseRecordAccess
    • DataReaderExtensions
    • DateTimeExtensions
    • Debouncer
    • DebugLog
    • DeferEnumerable<T>
    • DeferValue<V>
    • DictionaryExtensions
    • EnumHelper
    • ExceptionExtensions
    • GuidUtility
    • HandledException
    • HashSetExtensions
    • ICacheHandler
    • ICollectionExtensions
    • IDeferrable
    • IDeferredValue
    • IEnumerableExtensions
    • IgnoreDefaultValuesDictionary<K, V>
    • JsonDictionary<V>
    • OperationExtensions
    • Resource
    • SqlConnectionExtensions
    • SqlUtilities
    • StreamExtensions
    • StringExtensions
    • TableMapper
    • TimeoutDictionary<K, V>
    • TypeExtensions
    • XElementExtensions

Class ExceptionExtensions

Inheritance
object
ExceptionExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Estrelica.Utility
Assembly: Estrelica.Utility.dll
Syntax
public static class ExceptionExtensions

Methods

ContainsAllMessageText(Exception, params string[])

Returns true if all of the messageTextSubstrings are found in the hierarchy of flattened exceptions. If any messageTextSubstrings are null or empty strings, the result will always be false.

Declaration
public static bool ContainsAllMessageText(this Exception ex, params string[] messageTextSubstrings)
Parameters
Exception ex

string[] messageTextSubstrings

Returns
bool

Remarks

Substring comparison is not case sensitive.

ContainsAnyMessageText(Exception, params string[])

Returns true if any exceptions in the flattened hierachy have a Message containing any of the strings in messageTextSubstrings (excluding nulls and empty strings)

Declaration
public static bool ContainsAnyMessageText(this Exception ex, params string[] messageTextSubstrings)
Parameters
Exception ex

string[] messageTextSubstrings

Returns
bool

Remarks

Substring comparison is not case sensitive.

ContainsMessageText(Exception, string)

Returns true if any exceptions in the flattened hierarchy have a Message containing messageTextSubstring.

Declaration
public static bool ContainsMessageText(this Exception ex, string messageTextSubstring)
Parameters
Exception ex

string messageTextSubstring

Substring to locate in any of the exception's flattened hierarchy of Messages. If null or empty string, the result will always be false.

Returns
bool

Remarks

Substring comparison is not case sensitive.

FindException(Exception, Func<Exception, bool>)

Returns true if any exceptions in the flattened hiearchy satisfy the predicate.

Declaration
public static bool FindException(this Exception ex, Func<Exception, bool> predicate)
Parameters
Exception ex

Func<Exception, bool> predicate

Returns
bool

FindException<E>(Exception, Func<Exception, bool>)

Returns the first Exception of type E found in the exception's flattened hierarchy

Declaration
public static Exception FindException<E>(this Exception exception, Func<Exception, bool> predicate = null) where E : Exception
Parameters
Exception exception

The root exception

Func<Exception, bool> predicate

The predicate to be evaluated

Returns
Exception

Type Parameters
E

Exception type to find

Remarks

Note that the predicate will be evaluated on the original exception as well if it is of type E

Flatten(Exception)

Flattens a hierarchy of exceptions into an IEnumerable for easy checking of a specific exception that might be buried in InnerException, InnerExceptions, and their flattened results as well.

Declaration
public static IEnumerable<Exception> Flatten(this Exception ex)
Parameters
Exception ex

Returns
IEnumerable<Exception>

IEnumerable<Exception>

Remarks

Note that the original starting exception (if not null) will be returned as the first item in the iteration. If you only want the contained exceptions, use ".Skip(1)" on the results

Back to top Copyright 2019-2023 by CastleHill Software LLC