func UnmarshalOpt(v types.Value, opt Opt, out interface{}) (err error) {
	defer func() {
		if r := recover(); r != nil {
			switch r := r.(type) {
			case *UnmarshalTypeMismatchError, *UnsupportedTypeError, *InvalidTagError, *InvalidUnmarshalError:
				err = r.(error)
			case *unmarshalNomsError:
				err = r.err
			default:
				panic(r)
			}
		}
	}()
	MustUnmarshalOpt(v, opt, out)
	return
}
UnmarshalOpt is like Unmarshal but provides additional options.
package marshal
import (
	"fmt"
	"reflect"
	"sync"
	"github.com/attic-labs/noms/go/types"
)
func Unmarshal(v types.Value, out interface{}) (err error) {
	return UnmarshalOpt(v, Opt{}, out)
}