Learning by doing: Reading books and trying to understand the (code) examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
551 B

  1. #include "RuntimeErrorStub.h"
  2. #include "../util/RuntimeError.h"
  3. static const char *message = "No Error";
  4. static int parameter = -1;
  5. static const char *file = 0;
  6. static int line = -1;
  7. void RuntimeErrorStub_Reset(void) {
  8. message = "No Error";
  9. parameter = -1;
  10. }
  11. const char *RuntimeErrorStub_GetLastError(void) {
  12. return message;
  13. }
  14. void RuntimeError(const char *m, int p,
  15. const char *f, int l) {
  16. message = m;
  17. parameter = p;
  18. file = f;
  19. line = l;
  20. }
  21. int RuntimeErrorStub_GetLastParameter(void) {
  22. return parameter;
  23. }