Added error function.

pull/15/head
Jussi Pakkanen 12 years ago
parent bbc3664028
commit bfa9af8f13
  1. 5
      interpreter.py

@ -706,6 +706,7 @@ class Interpreter():
def build_func_dict(self):
self.funcs = {'project' : self.func_project,
'message' : self.func_message,
'error' : self.func_error,
'executable': self.func_executable,
'dependency' : self.func_dependency,
'static_library' : self.func_static_lib,
@ -841,6 +842,10 @@ class Interpreter():
self.validate_arguments(args, 1, [str])
mlog.log(mlog.bold('Message:'), args[0])
def func_error(self, node, args, kwargs):
self.validate_arguments(args, 1, [str])
raise InterpreterException('Error encountered: ' + args[0])
def add_languages(self, node, args):
for lang in args:
if lang in self.coredata.compilers:

Loading…
Cancel
Save