Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for popping up custom error by using modal dialog box

A dialog box and custom technology, applied in the direction of user interface execution, program control device, software design, etc., can solve the problems of using modal dialog box to pop up custom errors, garbled error messages, etc., and achieve the effect of friendly error message prompts

Inactive Publication Date: 2020-05-15
ZHUHAI HENGQIN SHENGDA ZHAOYE TECH INVESTMENT CO LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical problem solved by the present invention is to provide a method for using a modal dialog box to pop up a custom error; the present invention solves the problem that the error message is like garbled characters when displayed in front of the user

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for popping up custom error by using modal dialog box
  • Method for popping up custom error by using modal dialog box

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] Such as figure 1 Shown, the present invention adopts following steps:

[0028] Step 1. Define an exception class, inherit RuntimeException, and refactor its construction method; the specific steps described are:

[0029] (1) Create a CustomerException custom exception class that inherits the RuntimeException class in the project;

[0030] (2) Define some common default error codes, such as DEFAULT_ERROR_CODE, DEFAULT_SUCC_CODE, etc., and the variable error code variable errorCode;

[0031] (3) Add some construction methods with error codes.

[0032] Step 2: Add an exception parser in the system configuration file springmvc.xml, configure the capture method of exception information and the page path after the jump; the specific configuration of the exception parser has the following steps:

[0033] (1) Define the SimpleMappingExceptionResolver exception parser;

[0034] (2) Configure the default exception handling page defaultErrorView error value is error, define ex...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the SpringMVC technology, in particular to a method for popping up a custom error by using a modal dialog box. The method comprises the following steps: firstly, defining an exception class; then, adding an exception parser into a system configuration file springmvc.xml to configure a capture mode of exception information and a page path after skip; error information is obtained from the skipped abnormal page, and printing and secondary development are carried out; and finally, in a return result of the method using the ajax request, popping up the error information through the packaged modal dialog box to realize a friendly prompt effect. Unified processing of the system and the user-defined error information is achieved, the user is prompted in a more humanized and friendly mode, and the problem that the error information is shown in front of the user and has messy codes is solved.

Description

technical field [0001] The invention is based on the SpringMVC technology, and particularly relates to a method for popping up a custom error using a modal dialog box. Background technique [0002] How to deal with system error prompts is a problem that every project involves. If we simply handle it, that is, display the error information directly on the front-end page without any modification, then the user will see the most original information -- A bunch of English grammar error prompts. The result of this is that the user experience is very bad, causing users to mistakenly think that the website has a virus or a system crash, and choose to leave. [0003] The present invention aims at the above problems, adopts self-defined errors, intercepts various errors in the system, describes the error information in plain and clear language, then analyzes the page at the front end, and uses the encapsulated swal modal prompt box through certain code design After the ajax request...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/451G06F8/20
CPCG06F8/24G06F9/451
Inventor 陈林张来卿庞严冬
Owner ZHUHAI HENGQIN SHENGDA ZHAOYE TECH INVESTMENT CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products