improved exception messages during tests
This commit is contained in:
parent
cb5d91df19
commit
b78faff1bf
|
@ -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)=='[')
|
||||
|
|
|
@ -306,7 +306,7 @@ public class URIUtil
|
|||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalArgumentException();
|
||||
throw new IllegalArgumentException("Bad URI % encoding");
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -177,7 +177,7 @@ public class SchedulerTest
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
throw new RuntimeException();
|
||||
throw new RuntimeException("Thrown by testTaskThrowsException");
|
||||
}
|
||||
}, delay, TimeUnit.MILLISECONDS);
|
||||
|
||||
|
|
Loading…
Reference in New Issue