aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/coredata.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index d5f7d94..ef16cae 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -1,4 +1,4 @@
-# Copyright 2012-2018 The Meson development team
+# Copyright 2012-2019 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -645,6 +645,11 @@ def load(build_dir):
obj = pickle.load(f)
except pickle.UnpicklingError:
raise MesonException(load_fail_msg)
+ except AttributeError:
+ raise MesonException(
+ "Coredata file {!r} references functions or classes that don't "
+ "exist. This probably means that it was generated with an old "
+ "version of meson.".format(filename))
if not isinstance(obj, CoreData):
raise MesonException(load_fail_msg)
if obj.version != version: