Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config different exception handle processing for different controllers #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cicada-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>cicada-core</artifactId>
<version>2.0.2</version>
<version>2.0.3</version>
<packaging>jar</packaging>

<name>cicada-core</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package top.crossoverjie.cicada.server.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Function:
* annotation of cicada exception
* @author hugui
* Date: 2019-11-17 12:07
* @since JDK 1.8
*/

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CicadaCustomizeExceptionHandle {

Class<?> value();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package top.crossoverjie.cicada.server.exception;

import top.crossoverjie.cicada.server.context.CicadaContext;

/**
* Function: global exception handle
*
* @author hugui
* Date: 2019-11-17 17:12
* @since JDK 1.8
*/

public interface CustomizeHandleException {

/**
* exception handle
* @param context
* @param e
*/
void resolveException(CicadaContext context,Exception e) ;

}
Loading