Description
All of the thrown exception messages should be more descriptive. Below are some examples:
|
throw new IllegalStateException("fragmentState != FragmentState.EMPTY"); |
|
throw new IllegalStateException("fragmentState != FragmentState.WRITTEN"); |
|
throw new IllegalStateException("fragmentState != FragmentState.WRITTEN"); |
|
throw new IllegalStateException("fragmentState != FragmentState.WRITTEN"); |
For example toBytes() could be refactored:
fragmentState != FragmentState.WRITTEN
->
Can't convert Fragment to bytes: Unexpected FragmentState, expected to be "{expectedstate}", was "{currentstate}"
Use case or motivation behind the feature request
The messages are currently not very helpful as it is hard to distinguish which operation caused the exception and why, especially without stacktraces.
Related issues
teragrep/pth_06#330
Additional context
Description
All of the thrown exception messages should be more descriptive. Below are some examples:
rlo_06/src/main/java/com/teragrep/rlo_06/Fragment.java
Line 79 in b846414
rlo_06/src/main/java/com/teragrep/rlo_06/Fragment.java
Line 97 in b846414
rlo_06/src/main/java/com/teragrep/rlo_06/Fragment.java
Line 107 in b846414
rlo_06/src/main/java/com/teragrep/rlo_06/Fragment.java
Line 115 in b846414
For example
toBytes()could be refactored:fragmentState != FragmentState.WRITTEN->
Can't convert Fragment to bytes: Unexpected FragmentState, expected to be "{expectedstate}", was "{currentstate}"Use case or motivation behind the feature request
The messages are currently not very helpful as it is hard to distinguish which operation caused the exception and why, especially without stacktraces.
Related issues
teragrep/pth_06#330
Additional context