Manejo de errores

AymaraLang soporta try/catch/finally con palabras clave en aymara.

Sintaxis base

yant'aña {
    // código que puede fallar
} katjaña(e) {
    // manejo de error
} tukuyawi {
    // se ejecuta siempre
}
stateDiagram-v2 [*] --> Try Try --> Catch: pantja Try --> Finally: fin normal Catch --> Finally Finally --> [*]

Lanzar excepciones

pantja("TIPO", "mensaje");

Ejemplo mínimo

yant'aña {
    pantja("CONVERSION", "dato inválido");
} katjaña("CONVERSION", e) {
    qillqa(e.suti);
    qillqa(e.aru);
}

Siguiente: Gramática formal