summaryrefslogtreecommitdiff
path: root/kicad/lib-render.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-23 14:46:04 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-23 14:46:04 -0300
commitf5fa04cbf3ac9011f4f144cd68543f8d9536e3fd (patch)
treeac9160ef7ef5963e296144fb75845db56ba62e7c /kicad/lib-render.c
parent061dd9094a903be73e3aa7a65aafb8bcb70010b7 (diff)
downloadeeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.tar.gz
eeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.tar.bz2
eeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.zip
misc/diag.h (BUG): more useful diagnostics; replace all "abort" with it
Diffstat (limited to 'kicad/lib-render.c')
-rw-r--r--kicad/lib-render.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kicad/lib-render.c b/kicad/lib-render.c
index 54361ca..f73b227 100644
--- a/kicad/lib-render.c
+++ b/kicad/lib-render.c
@@ -71,7 +71,7 @@ static void draw_poly(const struct lib_poly *poly, const int m[6])
LAYER_COMP_DWG_BG);
break;
default:
- abort();
+ BUG("invalid fill '%c'", poly->fill);
}
}
@@ -97,7 +97,7 @@ static void draw_rect(const struct lib_rect *rect, const int m[6])
LAYER_COMP_DWG_BG);
break;
default:
- abort();
+ BUG("invalid fill '%c'", rect->fill);
}
}
@@ -125,7 +125,7 @@ static void draw_circ(const struct lib_circ *circ, const int m[6])
LAYER_COMP_DWG_BG);
break;
default:
- abort();
+ BUG("invalid fill '%c'", circ->fill);
}
}
@@ -422,7 +422,7 @@ static void draw_pin(const struct comp *comp, const struct lib_pin *pin,
hor = text_max;
break;
default:
- abort();
+ BUG("invalid orientation '%c'", pin->orient);
}
draw_pin_line(pin, shape, dx, dy, m);
@@ -474,7 +474,7 @@ static void draw_text(const struct lib_text *text, const int m[6])
txt.vert = text_flip(txt.vert);
break;
default:
- abort();
+ BUG("unknown rotation %d", txt.rot);
}
text_fig(&txt, COLOR_COMP_DWG, WIDTH_COMP_DWG);
@@ -533,7 +533,7 @@ static void draw(const struct comp *comp, const struct lib_obj *obj,
draw_pin(comp, &obj->u.pin, m);
break;
default:
- abort();
+ BUG("invalid object type %d", obj->type);
}
}