{"record":{"id":"e0dd4d47576c710f","repo":"apache/pulsar","slug":"e-getmessage-e0dd4d","errorCode":null,"errorMessage":"e.getMessage()","messagePattern":"e\\.getMessage\\(\\)","errorType":"console","errorClass":"TypeConversionException","httpStatus":null,"severity":"error","filePath":"pulsar-cli-utils/src/main/java/org/apache/pulsar/cli/converters/picocli/ByteUnitToLongConverter.java","lineNumber":31,"sourceCode":" * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\npackage org.apache.pulsar.cli.converters.picocli;\n\nimport static org.apache.pulsar.cli.converters.ByteUnitUtil.validateSizeString;\nimport picocli.CommandLine.ITypeConverter;\nimport picocli.CommandLine.TypeConversionException;\n\npublic class ByteUnitToLongConverter implements ITypeConverter<Long> {\n    @Override\n    public Long convert(String value) throws Exception {\n        try {\n            return validateSizeString(value);\n        } catch (Exception e) {\n            throw new TypeConversionException(e.getMessage());\n        }\n    }\n}\n","sourceCodeStart":13,"sourceCodeEnd":35,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-cli-utils/src/main/java/org/apache/pulsar/cli/converters/picocli/ByteUnitToLongConverter.java#L13-L35","documentation":"ByteUnitToLongConverter.convert wraps the size-validation error into picocli's TypeConversionException, forwarding the original IllegalArgumentException message (e.getMessage()) for an invalid byte-size argument.","triggerScenarios":"Thrown at pulsar-cli-utils/src/main/java/org/apache/pulsar/cli/converters/picocli/ByteUnitToLongConverter.java:31 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the size argument format per the converter message","Use plain numbers or K/M/G/T suffixes"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}