Skip to content

API Host AuroraException

Liu.Yandong.Hanks edited this page Aug 21, 2026 · 3 revisions

AuroraException

Base exception for AuroraScript engine operations.

Namespace: AuroraScript. Kind: class.

Back to .NET Host API Reference

Overview

AuroraException is the root of the AuroraScript exception hierarchy. Catching it covers both compile-time and run-time engine failures, including AuroraCompilationException and AuroraRuntimeException.

Tip

Catch the specific derived type when the host needs diagnostics or script stack frames; catch AuroraException only for a general engine-failure boundary.

Quick Reference

A minimal use of AuroraException.

try
{
    await engine.BuildAsync("main.as");
}
catch (AuroraException ex)
{
    Console.Error.WriteLine(ex.Message);
}

Constructors

AuroraException

AuroraException()
AuroraException(string message)
AuroraException(string message, Exception innerException)

Creates a base engine exception with an optional message and inner exception.

Parameters

Name Type Required Description
message string No Error description. Omitted by the parameterless overload.
innerException Exception No Underlying exception to wrap.

Returns

A new AuroraException instance.

throw new AuroraException("Engine configuration is invalid.");

Clone this wiki locally