Interface DataExceptionContributor
- All Known Implementing Classes:
AbstractFieldMapping,AbstractPipeline,AddFieldsAction,AggregateGroupFieldsAction,AmazonS3File,AmazonS3FileSink,AmazonS3FileSource,Attributes,AvroPipelineInput,AvroPipelineOutput,Bean,BinaryFieldDef,BloombergMessage,BooleanFieldDef,CalculatedField,Column,CompositePipelineAction,ConvertDateTimeToStringAction,ConvertNullToValueAction,ConvertNumberToStringAction,ConvertStringToBooleanAction,ConvertStringToDateTimeAction,ConvertStringToNumberAction,ConvertValueToStringAction,CopyFieldsAction,CsvPipelineInput,CsvPipelineOutput,DataMapping,DataMappingAction,DataMappingObject,DataMappingPart,DataMappingPipeline,DataMappingProblem,DataMappingResult,DataReaderPipelineInput,Dataset,DatasetPipelineInput,DataWriterPipelineOutput,DateTimePattern,DateTimePatternMatch,DecisionTable,DecisionTableAction,DecisionTableCondition,DecisionTableObject,DecisionTableOutcome,DecisionTableResult,DecisionTableRule,DecisionTree,DecisionTreeAction,DecisionTreeNode,DecisionTreeObject,DecisionTreeOutcome,DecisionTreeResult,Diff,EntityDef,EntityDefDiff,EntityRelationshipDef,EntityRelationshipDefDiff,ExcelPipelineInput,ExcelPipelineOutput,FieldDef,FieldDefDiff,FieldMapping,FileSinkPipelineOutput,FileSourcePipelineInput,FilterFieldExistsAction,FilterFieldMatchesPatternAction,FilterFieldNotNullAction,FilterMatchExpression,FixedWidthPipelineInput,FixedWidthPipelineOutput,FoundationObject,IndexDef,IndexDefDiff,IndexFieldDef,IndexFieldDefDiff,JdbcConnection,JdbcDataset,JdbcExportedKey,JdbcFieldIndex,JdbcImportedKey,JdbcIndex,JdbcPipelineInput,JdbcPipelineOutput,JdbcQuery,JdbcQueryColumn,JdbcQueryParameter,JdbcSchema,JdbcTable,JdbcTableColumn,JiraIssue,JiraSearch,JsonPipelineInput,JsonRecordPipelineInput,JsonRecordPipelineOutput,LatexPipelineOutput,LocalFile,LocalFileDataset,LocalFileSink,LocalFileSource,MemoryDataset,MicrosoftWordPipelineOutput,MvStoreDataset,NullPipeline,NumberDescriptor,NumberMatch,NumericFieldDef,OpenFinancialExchangePipelineInput,OrcPipelineInput,OrcPipelineOutput,ParquetPipelineInput,ParquetPipelineOutput,PdfPipelineInput,PdfPipelineOutput,Pipeline,PipelineAction,PipelineInput,PipelineObject,PipelineOutput,PoiSxssfProvider,PoiXssfbProvider,PoiXssfSaxProvider,Property,PropertyDiff,ProxyPipelineInput,ProxyPipelineOutput,RecordDiff,RecordFieldDef,RemoveDuplicatesAction,RenameFieldsAction,SchemaDef,SchemaDefDiff,SchemaObject,SchemaPart,SchemaProblem,SchemaValidationPath,SelectArrangeFieldsAction,ShopifyCustomerCriteria,ShopifyEventCriteria,ShopifyInventoryItem,ShopifyInventoryItemCriteria,ShopifyInventoryLevelCriteria,ShopifyOrder,ShopifyProductCriteria,ShopifyShippingAddress,SortFieldsAction,Tags,TemporalFieldDef,TextFieldDef,Tree,TreeNode,UuidFieldDef,ValidateFieldsExistsAction,ValidateFieldsMatchPatternAction,ValidateFieldsNotNullAction,ValidateMatchExpression,ValidationMessage,ValidationResult,XmlPipelineInput,XmlRecordPipelineInput,XmlRecordPipelineOutput
public interface DataExceptionContributor
An interface for classes capable of adding context/information to exceptions usually to aid in identifying and troubleshooting issues.
-
Method Summary
Modifier and TypeMethodDescriptiondefault DataExceptionaddExceptionProperties(DataException exception) Adds this object's current state to aDataException.default DataExceptionaddExceptionProperties(DataException exception, String namePrefix) Adds this object's current state to aDataException.static DataExceptioncontributeExceptionProperties(Throwable e, DataExceptionContributor... contributors) A utility method to add properties from a list ofDataExceptionContributorto the supplied exception.static DataExceptioncontributeExceptionProperties(Throwable e, String namePrefix, DataExceptionContributor... contributors) A utility method to add properties from a list ofDataExceptionContributorto the supplied exception with the given name prefix.default DataExceptionCreates an exception with the specified message and containing this endpoint's properties (name-value pairs).default DataExceptionConverts an exception to aDataException, prefixing the original message with the specified text and adding this endpoint's properties (name-value pairs).default DataExceptionConverts an exception to aDataExceptionand adds this endpoint's properties (name-value pairs).
-
Method Details
-
addExceptionProperties
Adds this object's current state to aDataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information. -
addExceptionProperties
Adds this object's current state to aDataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.Use
namePrefixas the beginning of property keys:exception.set(namePrefix + ".fileType", fileType); -
exception
Converts an exception to aDataException, prefixing the original message with the specified text and adding this endpoint's properties (name-value pairs).The returned exception can then be thrown in the normal way.
If the supplied exception is an instanceof
DataException, it will be returned, otherwise it will be nested inside aDataException. In either case the result message will contain the new prefix along with this endpoint properties. -
exception
Converts an exception to aDataExceptionand adds this endpoint's properties (name-value pairs).The returned exception can then be thrown in the normal way.
If the supplied exception is an instanceof
DataException, it will be returned, otherwise it will be nested inside aDataException. In either case the result message will contain this endpoint properties. -
exception
Creates an exception with the specified message and containing this endpoint's properties (name-value pairs).The returned exception can then be thrown in the normal way.
-
contributeExceptionProperties
static DataException contributeExceptionProperties(Throwable e, DataExceptionContributor... contributors) A utility method to add properties from a list ofDataExceptionContributorto the supplied exception. -
contributeExceptionProperties
static DataException contributeExceptionProperties(Throwable e, String namePrefix, DataExceptionContributor... contributors) A utility method to add properties from a list ofDataExceptionContributorto the supplied exception with the given name prefix.
-