From 1a0defc0fc98cfb312fc0107d2fef56a2ee593e8 Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 19 May 2016 20:48:47 +0000 Subject: [PATCH] in case of null argument it is more intuitive to report the argument index by counting from 1. --- src/runtime/java/org/grammaticalframework/pgf/Expr.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/java/org/grammaticalframework/pgf/Expr.java b/src/runtime/java/org/grammaticalframework/pgf/Expr.java index b23e10562..0195f8019 100644 --- a/src/runtime/java/org/grammaticalframework/pgf/Expr.java +++ b/src/runtime/java/org/grammaticalframework/pgf/Expr.java @@ -40,7 +40,7 @@ public class Expr implements Serializable { throw new IllegalArgumentException("fun == null"); for (int i = 0; i < args.length; i++) { if (args[i] == null) - throw new IllegalArgumentException("the "+i+"th argument is null"); + throw new IllegalArgumentException("the "+(i+1)+"th argument is null"); } this.pool = new Pool();