Skip to content

Commit

Permalink
lang, engine: Remove unneeded error wrapping
Browse files Browse the repository at this point in the history
These situations basically never fail, and if they do, we certainly
don't need more context. This simplifies things a bit.
  • Loading branch information
purpleidea committed Apr 20, 2023
1 parent 7075b8b commit c5efe7a
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 54 deletions.
2 changes: 1 addition & 1 deletion engine/graph/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (obj *State) Init() error {
FilteredGraph: func() (*pgraph.Graph, error) {
graph, err := pgraph.NewGraph("filtered")
if err != nil {
return nil, errwrap.Wrapf(err, "could not create graph")
return nil, err
}

// filter graph and build a new one...
Expand Down
2 changes: 1 addition & 1 deletion engine/resources/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ func TestResources2(t *testing.T) {
FilteredGraph: func() (*pgraph.Graph, error) {
//graph, err := pgraph.NewGraph("filtered")
//if err != nil {
// return nil, errwrap.Wrapf(err, "could not create graph")
// return nil, err
//}
// Hack: We just add ourself as allowed since
// we're just a one-vertex test suite...
Expand Down
Loading

0 comments on commit c5efe7a

Please sign in to comment.