mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
port: Show error when Gtk typelib is missing
Fixes #72 by showing a proper error message rather than crashing.
This commit is contained in:
parent
012fc61926
commit
0a1c9da2ec
4 changed files with 38 additions and 28 deletions
|
@ -40,17 +40,7 @@ class GtkDirective(AstNode):
|
|||
err.hint("Expected 'using Gtk 4.0;'")
|
||||
raise err
|
||||
|
||||
try:
|
||||
gir.get_namespace("Gtk", version)
|
||||
except CompileError as e:
|
||||
raise CompileError(
|
||||
"Could not find GTK 4 introspection files. Is gobject-introspection installed?",
|
||||
fatal=True,
|
||||
# preserve the hints from the original error, because it contains
|
||||
# useful debugging information
|
||||
hints=e.hints,
|
||||
)
|
||||
|
||||
gir.get_namespace("Gtk", version)
|
||||
|
||||
@property
|
||||
def gir_namespace(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue