1
0
Fork 0
forked from fun/fun

Documentation refactoring. No code changes. (0.40.5)

This commit is contained in:
Johannes Findeisen 2026-04-15 01:25:17 +02:00
commit 63545ed918
136 changed files with 374 additions and 3163 deletions

View file

@ -0,0 +1,40 @@
---
layout: page
published: true
noToc: false
noComments: false
noDate: false
title: Fun - Errors and Diagnostics
subtitle: Understanding parser/runtime errors and enabling diagnostics.
description: Understanding parser/runtime errors and enabling diagnostics.
permalink: /documentation/errors-and-diagnostics/
lang: en
tags:
- diagnostics
- enabling
- errors
- parser
- runtime
- understanding
---
This guide helps you understand common error messages and how to collect useful diagnostics.
## Common error classes
- Parse errors: syntax/indentation problems detected before execution.
- Name/lookup errors: missing variables, functions, or modules.
- Runtime errors: type mismatches, out-of-range access, invalid operations.
## Enabling diagnostics
- Build with `-DFUN_DEBUG=ON` to enable additional assertions and debug messages (see [build](./build/)).
- Run with smaller, focused scripts to isolate issues.
## Getting useful reports
- Capture the minimal script that reproduces the issue.
- Note your build options and platform.
- Record the full error output from the CLI (`fun`), including line/column if present.
## Tips
- Use prints or logging sparingly to narrow down failing code.
- Start from a passing simple case and add complexity until it breaks.