improved exception messages during tests

This commit is contained in:
Greg Wilkins 2015-02-18 17:35:43 +11:00
parent cb5d91df19
commit b78faff1bf
3 changed files with 4 additions and 3 deletions

View File

@ -39,7 +39,8 @@ public class HostPortHttpField extends HttpField
public HostPortHttpField(HttpHeader header, String name, String authority)
{
super(header,name,authority);
if (authority==null || authority.length()==0)
throw new IllegalArgumentException("No Authority");
try
{
if (authority.charAt(0)=='[')

View File

@ -306,7 +306,7 @@ public class URIUtil
}
else
{
throw new IllegalArgumentException();
throw new IllegalArgumentException("Bad URI % encoding");
}
break;

View File

@ -177,7 +177,7 @@ public class SchedulerTest
@Override
public void run()
{
throw new RuntimeException();
throw new RuntimeException("Thrown by testTaskThrowsException");
}
}, delay, TimeUnit.MILLISECONDS);