github.com/altipla-consulting/ravendb-go-client@v0.1.3/exceptions_utils.go (about) 1 package ravendb 2 3 func acceptError(action func() error) error { 4 err := action() 5 if err != nil { 6 return unwrapError(err) 7 } 8 return nil 9 } 10 11 func unwrapError(e error) error { 12 13 return e 14 /* 15 TODO: implement me 16 if (e instanceof ExecutionException) { 17 ExecutionException computationException = (ExecutionException) e; 18 return unwrapError(computationException.getCause()); 19 } 20 21 if (e instanceof RuntimeError) { 22 return (RuntimeError)e; 23 } 24 25 return new RuntimeError(e); 26 */ 27 }