package mantra.lang

BaseException

ABSTRACT public abstract class

Abstract root class for all system diagnostics, assertions, and runtime exceptions.

🏗️ Constructor Summary

Constructor Signature
def __init__(self, message: String)

⚙️ Method Summary

Modifier & Return Type Method Signature Description
String get_message() Returns the formatted diagnostic failure message.
Void print_stack_trace() Emits stack frame trace to standard error.

🔍 Detailed Method Specifications

pub def get_message() -> String
Returns the formatted diagnostic failure message.
pub def print_stack_trace() -> Void
Emits stack frame trace to standard error.

💡 Example Usage

baseexception_example.mantra
class DatabaseError extends BaseException:
    def __init__(self, sql: String):
        super("Database query failed: " + sql)