0

Print tracebacks on error

This commit is contained in:
Andrew Chin
2011-03-26 00:06:24 -04:00
parent 16a4abe843
commit 71a2a024cc

View File

@@ -35,6 +35,7 @@ int init_chunk_render(void) {
/* ensure none of these pointers are NULL */ /* ensure none of these pointers are NULL */
if ((!textures)) { if ((!textures)) {
fprintf(stderr, "\ninit_chunk_render failed to load; textures\n"); fprintf(stderr, "\ninit_chunk_render failed to load; textures\n");
PyErr_Print();
return 1; return 1;
} }
@@ -42,6 +43,7 @@ int init_chunk_render(void) {
/* ensure none of these pointers are NULL */ /* ensure none of these pointers are NULL */
if ((!chunk_mod)) { if ((!chunk_mod)) {
fprintf(stderr, "\ninit_chunk_render failed to load; chunk\n"); fprintf(stderr, "\ninit_chunk_render failed to load; chunk\n");
PyErr_Print();
return 1; return 1;
} }
@@ -53,6 +55,7 @@ int init_chunk_render(void) {
/* ensure none of these pointers are NULL */ /* ensure none of these pointers are NULL */
if ((!transparent_blocks) || (!blockmap) || (!special_blocks) || (!specialblockmap)) { if ((!transparent_blocks) || (!blockmap) || (!special_blocks) || (!specialblockmap)) {
fprintf(stderr, "\ninit_chunk_render failed\n"); fprintf(stderr, "\ninit_chunk_render failed\n");
PyErr_Print();
return 1; return 1;
} }