Migrate to error constants in glacier
This commit is contained in:
parent
3ab9b4d818
commit
0b86a94f14
30 changed files with 171 additions and 114 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "include/mammoth/debug.h"
|
||||
|
||||
#include <glacier/status/error.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <zcall.h>
|
||||
|
|
@ -25,18 +26,18 @@ void dbgln(const char* fmt, ...) {
|
|||
|
||||
void check(uint64_t code) {
|
||||
switch (code) {
|
||||
case Z_OK:
|
||||
case glcr::OK:
|
||||
return;
|
||||
case Z_ERR_UNIMPLEMENTED:
|
||||
case glcr::UNIMPLEMENTED:
|
||||
dbgln("crash: UNIMPLEMENTED");
|
||||
break;
|
||||
case Z_ERR_CAP_NOT_FOUND:
|
||||
case glcr::CAP_NOT_FOUND:
|
||||
dbgln("crash: missing capability");
|
||||
break;
|
||||
case Z_ERR_CAP_TYPE:
|
||||
case glcr::CAP_WRONG_TYPE:
|
||||
dbgln("crash: capability of the wrong type");
|
||||
break;
|
||||
case Z_ERR_CAP_DENIED:
|
||||
case glcr::CAP_PERMISSION_DENIED:
|
||||
dbgln("crash: capability permissions error");
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue