Skip to content

Commit

Permalink
prog: extend some error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dvyukov committed Mar 5, 2018
1 parent bc09be4 commit 4bad061
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prog/prog.go
Expand Up @@ -371,7 +371,7 @@ func (target *Target) defaultArg(t Type) Arg {
}
return MakePointerArg(t, 0, target.defaultArg(typ.Type))
default:
panic("unknown arg type")
panic(fmt.Sprintf("unknown arg type: %#v", t))
}
}

Expand All @@ -385,7 +385,7 @@ func (target *Target) isDefaultArg(arg Arg) bool {
case *IntType, *ConstType, *FlagsType, *LenType, *ProcType, *CsumType:
return a.Val == t.Default()
default:
panic("unknown const type")
panic(fmt.Sprintf("unknown const type: %#v", t))
}
case *GroupArg:
if !a.fixedInnerSize() {
Expand Down Expand Up @@ -427,7 +427,7 @@ func (target *Target) isDefaultArg(arg Arg) bool {
case *VmaType:
return a.Address == 0 && a.VmaSize == target.PageSize
default:
panic("unknown pointer type")
panic(fmt.Sprintf("unknown pointer type: %#v", t))
}
case *ResultArg:
t := a.Type().(*ResourceType)
Expand Down

0 comments on commit 4bad061

Please sign in to comment.