golang: log.Exitf->log.Fatalf

This commit is contained in:
Michael Teichgräber 2011-02-18 12:00:25 +01:00
parent ef9d2c6af6
commit 7cfd682971
4 changed files with 5 additions and 5 deletions

View File

@ -58,7 +58,7 @@ func Parse(text string, ext Extensions) *Doc {
func (d *Doc) parseRule(rule int, s string) { func (d *Doc) parseRule(rule int, s string) {
m := d.parser m := d.parser
if m.ResetBuffer(s) != "" { if m.ResetBuffer(s) != "" {
log.Exitf("Buffer not empty") log.Fatalf("Buffer not empty")
} }
if !m.Parse(rule) { if !m.Parse(rule) {
m.PrintError() m.PrintError()

View File

@ -181,7 +181,7 @@ func (w *htmlOut) elem(elt *element, obfuscate bool) *htmlOut {
w.elist(elt.children, obfuscate) w.elist(elt.children, obfuscate)
case RAW: case RAW:
/* Shouldn't occur - these are handled by process_raw_blocks() */ /* Shouldn't occur - these are handled by process_raw_blocks() */
log.Exitf("RAW") log.Fatalf("RAW")
case H1, H2, H3, H4, H5, H6: case H1, H2, H3, H4, H5, H6:
h := "h" + string('1'+elt.key-H1) + ">" /* assumes H1 ... H6 are in order */ h := "h" + string('1'+elt.key-H1) + ">" /* assumes H1 ... H6 are in order */
w.pad(2).s("<").s(h).elist(elt.children, obfuscate).s("</").s(h).pset(0) w.pad(2).s("<").s(h).elist(elt.children, obfuscate).s("</").s(h).pset(0)
@ -223,7 +223,7 @@ func (w *htmlOut) elem(elt *element, obfuscate bool) *htmlOut {
nn, nn, nn, nn) nn, nn, nn, nn)
} }
default: default:
log.Exitf("htmlOut.elem encountered unknown element key = %d\n", elt.key) log.Fatalf("htmlOut.elem encountered unknown element key = %d\n", elt.key)
} }
if s != "" { if s != "" {
w.s(s) w.s(s)

View File

@ -903,7 +903,7 @@ func match_inlines(l1, l2 *element) bool {
case LINK, IMAGE: case LINK, IMAGE:
return false /* No links or images within links */ return false /* No links or images within links */
default: default:
log.Exitf("match_inlines encountered unknown key = %d\n", l1.key) log.Fatalf("match_inlines encountered unknown key = %d\n", l1.key)
} }
l1 = l1.next l1 = l1.next
l2 = l2.next l2 = l2.next

View File

@ -12341,7 +12341,7 @@ func match_inlines(l1, l2 *element) bool {
case LINK, IMAGE: case LINK, IMAGE:
return false /* No links or images within links */ return false /* No links or images within links */
default: default:
log.Exitf("match_inlines encountered unknown key = %d\n", l1.key) log.Fatalf("match_inlines encountered unknown key = %d\n", l1.key)
} }
l1 = l1.next l1 = l1.next
l2 = l2.next l2 = l2.next