Returns a duration type error. @param info input info (can be null) @param item item @return duration @throws QueryException query exception
(final InputInfo info, final Item item)
| 485 | * @throws QueryException query exception |
| 486 | */ |
| 487 | static Dur dur(final InputInfo info, final Item item) throws QueryException { |
| 488 | final Type type = item.type; |
| 489 | if(item instanceof final Dur dur) { |
| 490 | if(type == DURATION) throw NOSUBDUR_X.get(info, item); |
| 491 | return dur; |
| 492 | } |
| 493 | throw NODUR_X_X.get(info, type, item); |
| 494 | } |
| 495 | |
| 496 | @Override |
| 497 | public String toString() { |