---
title: ConverterException
summary: API reference for ConverterException.
status: draft
owner: <owner>
last_reviewed: 2026-07-23
library: SAIF.Framework.BaseN
reference_type: package
---

# 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.

<!-- System.Exception is a .NET BCL type, not a documented dependency framework library; standard members (Message, StackTrace, etc.) are omitted per scope. -->

## 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](../../business-rules.md#br-001-hexadecimal-digit-must-not-exceed-base-16)) and `ExcelConverter.ConvertNumericToAlpha`/`ConvertAlphaToNumeric`/`FormatBaseN` ([BR-002](../../business-rules.md#br-002-excel-base-26-digit-must-not-exceed-base-26)).
- Not thrown by `ConverterBase`, `BinaryConverter`, or `OctalConverter`, which use non-strict default digit conversion instead ([BR-004](../../business-rules.md#br-004-non-numeric-input-to-the-default-alpha-to-numeric-conversion-is-treated-as-zero)).

> **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`
