initial commit of untested function stuff
This commit is contained in:
21
error.go
Normal file
21
error.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package go_llm
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Error is essentially just an error, but it is used to differentiate between a normal error and a fatal error.
|
||||
type Error struct {
|
||||
error
|
||||
|
||||
Source error
|
||||
Parameter error
|
||||
}
|
||||
|
||||
func newError(parent error, err error) Error {
|
||||
e := fmt.Errorf("%w: %w", parent, err)
|
||||
return Error{
|
||||
error: e,
|
||||
|
||||
Source: parent,
|
||||
Parameter: err,
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user