Skip to content

Make the API less verbose #20

@chiaradiamarcelo

Description

@chiaradiamarcelo

as the messages grow in parameters, it's a little bit cumbersome and verbose to define them all explicitly.

For example,

RemoteMetadataReaderException(ExaError.messageBuilder("E-VS-COM-JDBC-31")
        .message("Unsupported data type(s) {{dataTypes}} in column(s) in query: {{unsupportedColumns}}.")
        .unquotedParameter("dataTypes", dataTypes)  
        .unquotedParameter("unsupportedColumns", unsupportedColumns)
        .mitigation("Please remove those columns from your query:\n{{query}}")
        .unquotedParameter("query", query).toString());

It would be nicer to define the interface similar to slf4j logger, so the previous example would become

RemoteMetadataReaderException(ExaError.messageBuilder("E-VS-COM-JDBC-31")
        .message("Unsupported data type(s) {} in column(s) in query: {}.", dataTypes, unsupportedColumns)
        .mitigation("Please remove those columns from your query:\n{}", query).toString());

Metadata

Metadata

Labels

featureProduct feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions