-
Md. Alim Ul Karim authored
# New error types added, core version updated, JSON serializing added for all error types - New error types added - core version updated - JSON parsing serializing abilities added to the errorwrapper types - Removed errmsg pkg (unused for long time) Note: [Template Reference](https://hackmd.io/@akarimevatix/H1Qsmq23w) ## Worked on Items - New error types added - core version updated - JSON parsing serializing abilities added to the errorwrapper types - Removed errmsg pkg (unused for long time) ## TODOs - [ ] NA ## References - N/A ## Notes ## Code example ```go err := errnew.Refs(errtype.AnalysisFailed, "varName", []int{1, 20}, ",", "msg1") collection := errwrappers.New(5) collection.AddWrapperPtr(&err) fmt.Println(collection.String()) jsonResult := collection.Json() errorsCollection := errwrappers.New(1) jsonResult.Unmarshal(&errorsCollection) fmt.Println(errorsCollection.String()) ``` ![image](/uploads/3f5b90840de73bff5d178ea8e055b75b/image.png) ``` # Error Wrappers - Collection - Length[1] - [Error (AnalysisFailed - #138): Analysis is failed. Please consult with appropriate personnel to get the solution. "msg1" Reference(s) {varName([]int) : [1 20]}.] # Error Wrappers - Collection - Length[1] - [Error (AnalysisFailed - #138): Analysis is failed. Please consult with appropriate personnel to get the solution. "msg1" Reference(s) {varName(string) : [1 20]}.] Process finished with exit code 0 ``` See merge request !24
03ea6009
Loading