mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-05 00:11:55 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			333 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			333 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package errors
 | 
						|
 | 
						|
type DetailedError struct {
 | 
						|
	msg  string
 | 
						|
	code string
 | 
						|
}
 | 
						|
 | 
						|
func (this *DetailedError) Error() string {
 | 
						|
	return this.msg
 | 
						|
}
 | 
						|
 | 
						|
func (this *DetailedError) Code() string {
 | 
						|
	return this.code
 | 
						|
}
 | 
						|
 | 
						|
func NewDetailedError(code string, errString string) *DetailedError {
 | 
						|
	return &DetailedError{
 | 
						|
		msg:  errString,
 | 
						|
		code: code,
 | 
						|
	}
 | 
						|
}
 |