mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Simplify error & warning handling
This commit is contained in:
parent
122b049ce9
commit
b6ee649458
8 changed files with 38 additions and 21 deletions
|
@ -21,7 +21,7 @@
|
|||
import typing as T
|
||||
import argparse, json, os, sys
|
||||
|
||||
from .errors import PrintableError, report_bug, MultipleErrors
|
||||
from .errors import PrintableError, report_bug, MultipleErrors, CompilerBugError
|
||||
from .lsp import LanguageServer
|
||||
from . import parser, tokenizer, decompiler, interactive_port
|
||||
from .utils import Colors
|
||||
|
@ -149,8 +149,8 @@ class BlueprintApp:
|
|||
|
||||
if errors:
|
||||
raise errors
|
||||
if len(ast.errors):
|
||||
raise MultipleErrors(ast.errors)
|
||||
if ast is None:
|
||||
raise CompilerBugError()
|
||||
|
||||
formatter = XmlOutput()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue