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)
|
public HostPortHttpField(HttpHeader header, String name, String authority)
|
||||||
{
|
{
|
||||||
super(header,name,authority);
|
super(header,name,authority);
|
||||||
|
if (authority==null || authority.length()==0)
|
||||||
|
throw new IllegalArgumentException("No Authority");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (authority.charAt(0)=='[')
|
if (authority.charAt(0)=='[')
|
||||||
|
|
|
@ -306,7 +306,7 @@ public class URIUtil
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException("Bad URI % encoding");
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class SchedulerTest
|
||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
throw new RuntimeException();
|
throw new RuntimeException("Thrown by testTaskThrowsException");
|
||||||
}
|
}
|
||||||
}, delay, TimeUnit.MILLISECONDS);
|
}, delay, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue