Class IronBarCodeParsingException
Represents errors that occur during the parsing of structured barcode data by IronBarCode.
Namespace: IronBarCode.Exceptions
Assembly: IronBarCode.dll
Syntax
public class IronBarCodeParsingException : IronBarCodeException
Remarks
This exception is thrown when IronBarCode encounters errors while parsing structured barcode formats
such as GS1, Code128, or other complex barcode standards. The exception provides detailed
information about what went wrong during parsing, including validation errors, warnings, and the
position where the error occurred.
Examples
try
{
var result = Code128GS1Parser.Parse(barcodeData);
}
catch (IronBarCodeParsingException ex)
{
Console.WriteLine($"Parser: {ex.ParserType}");
Console.WriteLine($"Input: {ex.Input}");
Console.WriteLine($"Errors: {string.Join(", ", ex.ValidationErrors)}");
}
Properties
Input
The input that caused the parsing error
Declaration
public string Input { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ParserType
Type of parser that failed (e.g., "GS1", "Code128", "QR", etc.)
Declaration
public string ParserType { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Position
Position in the input where the error occurred (if applicable)
Declaration
public Nullable<int> Position { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int32> |
ValidationErrors
List of validation errors from ParseResult
Declaration
public IReadOnlyList<string> ValidationErrors { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyList<System.String> |
ValidationWarnings
List of validation warnings from ParseResult
Declaration
public IReadOnlyList<string> ValidationWarnings { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IReadOnlyList<System.String> |