1.1 --- a/lib/__builtins__/core.py Sat Nov 19 18:17:54 2016 +0100
1.2 +++ b/lib/__builtins__/core.py Sat Nov 19 18:30:54 2016 +0100
1.3 @@ -59,6 +59,7 @@
1.4
1.5 class BaseException(object): pass
1.6 class Exception(BaseException): pass
1.7 +class UnboundMethodInvocation(Exception): pass
1.8 class Warning(object): pass
1.9
1.10 def get_using(callable, instance): pass
2.1 --- a/templates/progops.c Sat Nov 19 18:17:54 2016 +0100
2.2 +++ b/templates/progops.c Sat Nov 19 18:30:54 2016 +0100
2.3 @@ -8,7 +8,7 @@
2.4 #include "progops.h"
2.5 #include "progtypes.h"
2.6 #include "main.h"
2.7 -#include <stdio.h>
2.8 +#include "exceptions.h"
2.9
2.10 /* Generic instantiation operations, defining common members. */
2.11
2.12 @@ -124,10 +124,10 @@
2.13
2.14 __attr __unbound_method(__attr args[])
2.15 {
2.16 - /* NOTE: Should raise an exception. */
2.17 -
2.18 - fprintf(stderr, "Unbound method called!\n");
2.19 - exit(1);
2.20 + __attr excargs[1];
2.21 + __attr exc = __new___builtins___core_UnboundMethodInvocation(excargs);
2.22 + __Raise(exc);
2.23 + return __builtins___none_None; /* superfluous */
2.24 }
2.25
2.26 /* Generic operations depending on specific program details. */