Added print method to error
This commit is contained in:
		
							parent
							
								
									a755fc9f41
								
							
						
					
					
						commit
						c23413eedf
					
				| @ -1,5 +1,6 @@ | ||||
| package file | ||||
| 
 | ||||
| import "os" | ||||
| import "fmt" | ||||
| 
 | ||||
| type ErrorKind int | ||||
| @ -70,3 +71,8 @@ func (err Error) Error () (formattedMessage string) { | ||||
| 
 | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // Print formats the error and prints it to stderr. | ||||
| func (err Error) Print () { | ||||
| 	os.Stderr.Write([]byte(err.Error())) | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user