format: change debugging log.Fatal to log.Printf

This commit is contained in:
Todd 2017-09-18 23:13:01 -04:00
parent b03eec358d
commit b30eaaae44
2 changed files with 6 additions and 6 deletions

View File

@ -171,7 +171,7 @@ func AbsoluteFilename(dt DocType, typ string, index int) string {
case DocTypeSpreadsheet:
return fmt.Sprintf("xl/drawings/vmlDrawing%d.vml", index)
default:
log.Fatalf("unsupported type %s pair and %v", typ, dt)
log.Printf("unsupported type %s pair and %v", typ, dt)
}
// SML

View File

@ -89,7 +89,7 @@ func (f *Format) AddPlaceholder(t FmtType, l []byte) {
case FmtTypeDigitOptThousands:
f.hasThousands = true
default:
log.Printf("unsupported ph type in parse %s", t)
log.Printf("unsupported ph type in parse %v", t)
}
}
@ -217,7 +217,7 @@ func number(vOrig float64, f Format, isNeg bool) string {
case FmtTypeTime:
op = append(op, reverse(dTime(t, vOrig, ph.DateTime))...)
default:
log.Fatalf("unsupported type in whole %v", ph)
log.Printf("unsupported type in whole %v", ph)
}
}
buf = append(buf, reverse(op)...)
@ -288,7 +288,7 @@ func number(vOrig float64, f Format, isNeg bool) string {
case FmtTypeLiteral:
op = append(op, ph.Literal)
default:
log.Fatalf("unsupported type in fractional %v", ph)
log.Printf("unsupported type in fractional %v", ph)
}
}
// remaining digits are truncated
@ -496,7 +496,7 @@ func dDate(t time.Time, f string) []byte {
case "dddd":
ret = t.AppendFormat(ret, "Monday")
default:
log.Fatalf("unsupported date format %s", s)
log.Printf("unsupported date format %s", s)
}
if f[i] == '/' {
ret = append(ret, '/')
@ -556,7 +556,7 @@ func dTime(t time.Time, v float64, f string) []byte {
ret = strconv.AppendInt(ret, int64(v*24*60*60), 10)
case "":
default:
log.Fatalf("unsupported time format %s", s)
log.Printf("unsupported time format %s", s)
}
if f[i] == ':' {
ret = append(ret, ':')