Patched httpc error message to actually be readable on console; also provides Result code
This commit is contained in:
@@ -301,7 +301,7 @@ void throw_error(char* error, ErrorLevel level)
|
|||||||
|
|
||||||
draw_base_interface();
|
draw_base_interface();
|
||||||
draw_text_center(GFX_TOP, 100, 0.5f, 0.6f, 0.6f, colors[text_color], error);
|
draw_text_center(GFX_TOP, 100, 0.5f, 0.6f, 0.6f, colors[text_color], error);
|
||||||
draw_c2d_text_center(GFX_TOP, 150, 0.5f, 0.6f, 0.6f, colors[COLOR_WHITE], &text[bottom_text]);
|
draw_c2d_text_center(GFX_TOP, 170, 0.5f, 0.6f, 0.6f, colors[COLOR_WHITE], &text[bottom_text]);
|
||||||
end_frame();
|
end_frame();
|
||||||
|
|
||||||
if(kDown & KEY_A) break;
|
if(kDown & KEY_A) break;
|
||||||
|
|||||||
@@ -953,7 +953,7 @@ redirect: // goto here if we need to redirect
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ERROR_BUFFER_SIZE 0x70
|
#define ERROR_BUFFER_SIZE 0x80
|
||||||
char err_buf[ERROR_BUFFER_SIZE];
|
char err_buf[ERROR_BUFFER_SIZE];
|
||||||
ParseResult parse = parse_header(&_header, &context, acceptable_mime_types);
|
ParseResult parse = parse_header(&_header, &context, acceptable_mime_types);
|
||||||
switch (parse)
|
switch (parse)
|
||||||
@@ -991,8 +991,9 @@ redirect: // goto here if we need to redirect
|
|||||||
snprintf(err_buf, ERROR_BUFFER_SIZE, ZIP_NOT_AVAILABLE);
|
snprintf(err_buf, ERROR_BUFFER_SIZE, ZIP_NOT_AVAILABLE);
|
||||||
goto error;
|
goto error;
|
||||||
case HTTPC_ERROR:
|
case HTTPC_ERROR:
|
||||||
DEBUG("httpc error\n");
|
DEBUG("httpc error %lx\n", _header.result_code);
|
||||||
throw_error("Error in HTTPC sysmodule.\nIf you are seeing this, please\ncontact an Anemone developer on\nthe ThemePlaza Discord.", ERROR_LEVEL_ERROR);
|
snprintf(err_buf, ERROR_BUFFER_SIZE, "Error in HTTPC sysmodule - 0x%lx.\nIf you are seeing this, please contact an\nAnemone developer on the ThemePlaza Discord.", _header.result_code);
|
||||||
|
throw_error(err_buf, ERROR_LEVEL_ERROR);
|
||||||
quit = true;
|
quit = true;
|
||||||
httpcCloseContext(&context);
|
httpcCloseContext(&context);
|
||||||
return _header.result_code;
|
return _header.result_code;
|
||||||
|
|||||||
Reference in New Issue
Block a user