Class: SubstanceMetadataError

SubstanceMetadataError(rowNumber, column, message, errorType)

Error information for substance metadata parsing issues. Provides structured error information that distinguishes between user data errors (invalid CSV content) and system programming errors. Includes row and column information to help users locate and fix issues in their data.

Constructor

new SubstanceMetadataError(rowNumber, column, message, errorType)

Create a new SubstanceMetadataError.
Parameters:
Name Type Default Description
rowNumber number Row number where error occurred (0 for header, 1-based for data rows)
column string Column name where error occurred
message string Human-readable error description
errorType string USER 'USER' for data errors or 'SYSTEM' for programming errors
Source:

Methods

getColumn() → {string}

Get the column name where the error occurred.
Source:
Returns:
Column name
Type
string

getErrorType() → {string}

Get the error type.
Source:
Returns:
'USER' or 'SYSTEM'
Type
string

getMessage() → {string}

Get the human-readable error message.
Source:
Returns:
Error message
Type
string

getRowNumber() → {number}

Get the row number where the error occurred.
Source:
Returns:
Row number (0 for header, 1-based for data rows)
Type
number

isSystemError() → {boolean}

Check if this is a system programming error.
Source:
Returns:
True if this is a system error
Type
boolean

isUserError() → {boolean}

Check if this is a user data error.
Source:
Returns:
True if this is a user error
Type
boolean

toString() → {string}

Convert error to human-readable string.
Source:
Returns:
Formatted error description
Type
string