io.quarkus.code.rest.exceptions.CodestartStructureExceptionMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of code-quarkus Show documentation
Show all versions of code-quarkus Show documentation
Customize a Web Interface to generate Quarkus starter projects.
package io.quarkus.code.rest.exceptions;
import io.quarkus.devtools.codestarts.CodestartStructureException;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.ext.Provider;
@Provider
public class CodestartStructureExceptionMapper implements ExceptionMapper {
@Override
public Response toResponse(CodestartStructureException e) {
String message = "Codestart structure error > " + e.getMessage();
return Response.status(Response.Status.INTERNAL_SERVER_ERROR)
.entity(message)
.type(MediaType.TEXT_PLAIN)
.build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy