Skip to content

Commit 9696dff

Browse files
Correct errors
1 parent 2e3cecd commit 9696dff

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

codegen/api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -683,12 +683,12 @@ from multilingualprogramming.errors import (
683683

684684
try:
685685
executor.execute(source, language="fr")
686-
except MultilingualSyntaxError as e:
687-
print(f"Syntax error (line {e.lineno}): {e.message}")
688-
except MultilingualSemanticError as e:
689-
print(f"Semantic error: {e.message}")
690-
except MultilingualRuntimeError as e:
691-
print(f"Runtime error: {e.message}")
686+
except MultilingualSyntaxError as err:
687+
print(f"Syntax error (line {err.lineno}): {err.message}")
688+
except MultilingualSemanticError as err:
689+
print(f"Semantic error: {err.message}")
690+
except MultilingualRuntimeError as err:
691+
print(f"Runtime error: {err.message}")
692692
```
693693

694694
Error messages are localized to the source language — French programs show errors in French, Japanese programs show errors in Japanese.

wasm/installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ try:
146146

147147
result = MatrixOperations.multiply([[1, 2], [3, 4]], [[5, 6], [7, 8]])
148148
print(f" ✓ Matrix multiply: success")
149-
except Exception as e:
150-
print(f" ✗ Error: {e}")
149+
except Exception as err:
150+
print(f" ✗ Error: {err}")
151151

152152
print("\n" + "=" * 60)
153153
if selector.is_wasm_available():
@@ -177,8 +177,8 @@ selector = BackendSelector(prefer_backend=Backend.PYTHON)
177177
selector = BackendSelector(prefer_backend=Backend.WASM)
178178
try:
179179
result = selector.call_function("fibonacci", 10)
180-
except RuntimeError as e:
181-
print(f"WASM not available: {e}")
180+
except RuntimeError as err:
181+
print(f"WASM not available: {err}")
182182
```
183183

184184
### Environment Variables

wasm/troubleshooting.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ selector = BackendSelector(config=config)
260260

261261
try:
262262
result = selector.call_function("long_operation", *args)
263-
except RuntimeError as e:
264-
print(f"Timeout: {e}")
263+
except RuntimeError as err:
264+
print(f"Timeout: {err}")
265265
# Fall back to Python
266266
```
267267

@@ -315,8 +315,8 @@ print(f"\nInstallation:")
315315
try:
316316
import multilingualprogramming
317317
print(f" multilingualprogramming: ✓ {multilingualprogramming.__version__}")
318-
except ImportError as e:
319-
print(f" multilingualprogramming: ✗ {e}")
318+
except ImportError as err:
319+
print(f" multilingualprogramming: ✗ {err}")
320320

321321
try:
322322
import wasmtime
@@ -336,16 +336,16 @@ try:
336336
s = BackendSelector()
337337
print(f" Available: {s.is_wasm_available()}")
338338
print(f" Backend: {s.backend}")
339-
except Exception as e:
340-
print(f" Error: {e}")
339+
except Exception as err:
340+
print(f" Error: {err}")
341341

342342
print(f"\nFallback Functions:")
343343
try:
344344
from multilingualprogramming.runtime.python_fallbacks import FALLBACK_REGISTRY
345345
print(f" Registered: {len(FALLBACK_REGISTRY)} functions")
346346
print(f" Functions: {', '.join(sorted(FALLBACK_REGISTRY.keys())[:10])}...")
347-
except Exception as e:
348-
print(f" Error: {e}")
347+
except Exception as err:
348+
print(f" Error: {err}")
349349

350350
print("\n" + "=" * 60)
351351
```

0 commit comments

Comments
 (0)