Explorar el Código

添加错误处理

DESKTOP-2K9OVK9\siwei hace 4 meses
padre
commit
ac92f32430

+ 4 - 1
onemap-gateway/src/main/java/com/onemap/gateway/handler/ValidateCodeHandler.java

@@ -1,6 +1,9 @@
 package com.onemap.gateway.handler;
 
 import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.stereotype.Component;
@@ -32,7 +35,7 @@ public class ValidateCodeHandler implements HandlerFunction<ServerResponse>
         {
             ajax = validateCodeService.createCaptcha();
         }
-        catch (CaptchaException | IOException e)
+        catch (CaptchaException | IOException | NoSuchAlgorithmException | NoSuchProviderException e)
         {
             return Mono.error(e);
         }