Improved IllegalStateException message.

This commit is contained in:
Simone Bordet 2015-09-25 16:54:36 +02:00
parent 8c21871cf0
commit 6544af8ce7
1 changed files with 6 additions and 6 deletions

View File

@ -216,7 +216,7 @@ public abstract class IteratingCallback implements Callback
case CLOSED: case CLOSED:
default: default:
throw new IllegalStateException("state="+_state); throw new IllegalStateException(toString());
} }
} }
} }
@ -288,7 +288,7 @@ public abstract class IteratingCallback implements Callback
} }
default: default:
throw new IllegalStateException("state="+_state+" action="+action); throw new IllegalStateException(String.format("%s[action=%s]", this, action));
} }
} }
@ -304,7 +304,7 @@ public abstract class IteratingCallback implements Callback
} }
default: default:
throw new IllegalStateException("state="+_state+" action="+action); throw new IllegalStateException(String.format("%s[action=%s]", this, action));
} }
} }
@ -316,7 +316,7 @@ public abstract class IteratingCallback implements Callback
case IDLE: case IDLE:
case PENDING: case PENDING:
default: default:
throw new IllegalStateException("state="+_state+" action="+action); throw new IllegalStateException(String.format("%s[action=%s]", this, action));
} }
} }
} }
@ -357,7 +357,7 @@ public abstract class IteratingCallback implements Callback
} }
default: default:
{ {
throw new IllegalStateException("state="+_state); throw new IllegalStateException(toString());
} }
} }
} }
@ -394,7 +394,7 @@ public abstract class IteratingCallback implements Callback
break; break;
} }
default: default:
throw new IllegalStateException("state="+_state); throw new IllegalStateException(toString());
} }
} }
if (failure) if (failure)