mirror of
https://github.com/usatiuk/psil.git
synced 2025-10-29 03:07:49 +01:00
error on unknown function
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "Command.h"
|
#include "Command.h"
|
||||||
@@ -131,6 +132,7 @@ Handle Compiler::compile(const Handle &src, Handle fake_env, const Handle &suffi
|
|||||||
|
|
||||||
out.append(make_cmd(LD));
|
out.append(make_cmd(LD));
|
||||||
Handle idx = findIndex(car, fake_env);
|
Handle idx = findIndex(car, fake_env);
|
||||||
|
if (idx.null()) throw std::invalid_argument("Could not find function to apply: " + std::string(car.strval()));
|
||||||
out.append(idx);
|
out.append(idx);
|
||||||
out.append(make_cmd(AP));
|
out.append(make_cmd(AP));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user