Rework Error interface

Package Errors:
- add function to check & cast error interface into golib Error interface
- update CodeError type to simplify management & error creation
- add function to simplify call of Error function from a generic error interface
- remove some useless function from Error interface

All Other Packages:
- apply change of package Errors into all other packages
This commit is contained in:
Nicolas JUHEL
2023-08-25 15:48:35 +02:00
parent a672f6ed10
commit 984ba51587
189 changed files with 1283 additions and 1435 deletions

View File

@@ -118,7 +118,7 @@ func NewCluster(cfg Config, fctCreate interface{}) (Cluster, liberr.Error) {
}
if n, e := dgbclt.NewNodeHost(cfg.GetDGBConfigNode()); e != nil {
return nil, ErrorNodeHostNew.ErrorParent(e)
return nil, ErrorNodeHostNew.Error(e)
} else {
c.nodeHost = n
}