Created
August 24, 2023 10:42
-
-
Save akihisa-shimada/215b9a4e2acd898da1aa43b813efe7a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.proto.grpc.exception.message; | |
import io.grpc.Status; | |
/** | |
* 特定のgRPCレスポンスのための例外クラスです。 | |
* | |
* @see org.springframework.web.server.ResponseStatusException | |
*/ | |
public class ResponseStatusException extends RuntimeException { | |
final Status status; | |
public ResponseStatusException(Status status, String message) { | |
super(message); | |
this.status = status; | |
} | |
public ResponseStatusException(Status status, String message, Throwable cause) { | |
super(message, cause); | |
this.status = status; | |
} | |
public Status getStatus() { | |
return status; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment