22 lines
367 B
Go
22 lines
367 B
Go
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,
|
|
}
|
|
}
|