Skip to content

ConverterException

ConverterException is a custom exception type thrown by HexConverter and ExcelConverter when a digit value exceeds the converter's configured base.

Purpose

  • Signal that a digit value passed to a base-N converter is invalid because it exceeds the converter's Base.

Context

  • Namespace: SAIF.Framework.BaseN
  • Assembly/package: SAIF.Framework.BaseN (also bundled into the SAIF.BOF.Framework NuGet package)

Public members

Member Signature Purpose
New Public Sub New(ByVal value As String, ByVal base As Integer) Constructs the exception with a formatted message: "'{value}' must be less than '{base}'".

Inherited public members

Members in this section are inherited from System.Exception. They are available on this type through inheritance.

Behavioral notes

  • The constructor accepts the offending value and the converter's base and formats them directly into the exception's Message; no separate Value/Base properties are exposed on the exception itself.*

Constraints and usage notes

  • Thrown by HexConverter.ConvertAlphaToNumeric/ConvertNumericToAlpha (BR-001) and ExcelConverter.ConvertNumericToAlpha/ConvertAlphaToNumeric/FormatBaseN (BR-002).
  • Not thrown by ConverterBase, BinaryConverter, or OctalConverter, which use non-strict default digit conversion instead (BR-004).

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified. Statements marked with † were retrieved from dependency library documentation via the Legends CLI RAG service. They describe inherited behavior from the indicated origin library and should be verified if the dependency version changes.

Sources

  • SAIF.Framework.BaseN\ConverterException.vb
  • SAIF.Framework.BaseN\HexConverter.vb
  • SAIF.Framework.BaseN\ExcelConverter.vb