Skip to content

Commit b8a18db

Browse files
committed
Replace Invalid JSON msg with exception msg
1 parent c74be90 commit b8a18db

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

plugin/src/main/shell/protoc-gen-flit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# The quiet flag is required otherwise the tooling will dump output to stdout which will break the
1616
# plugin output and generation will fail.
1717
# -----------------------------------------------------------------------------
18-
DIR=$(dirname "$0")
18+
DIR=$(dirname $(readlink -f "$0"))
1919

2020
JAR=$(ls -c ${DIR}/plugin-*-all.jar | head -1)
2121
java ${FLIT_JAVA_OPTS} -jar $JAR $@

runtime/spring/src/main/java/com/flit/runtime/spring/FlitExceptionHandler.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
import com.flit.runtime.ErrorCode;
44
import com.flit.runtime.FlitException;
55
import com.google.protobuf.InvalidProtocolBufferException;
6-
import java.util.HashMap;
7-
import java.util.Map;
8-
import javax.servlet.http.HttpServletRequest;
96
import org.slf4j.Logger;
107
import org.slf4j.LoggerFactory;
118
import org.springframework.http.MediaType;
@@ -15,11 +12,15 @@
1512
import org.springframework.web.bind.annotation.ExceptionHandler;
1613
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
1714

15+
import javax.servlet.http.HttpServletRequest;
16+
import java.util.HashMap;
17+
import java.util.Map;
18+
1819
@ControllerAdvice
1920
@Component
2021
public class FlitExceptionHandler extends ResponseEntityExceptionHandler {
2122

22-
private static final Logger LOGGER = LoggerFactory.getLogger(FlitExceptionHandler.class);
23+
private static final Logger LOGGER = LoggerFactory.getLogger(FlitExceptionHandler.class);
2324

2425

2526
@ExceptionHandler(Exception.class)

0 commit comments

Comments
 (0)