• Daniel Martí's avatar
    fluent/qp: don't panic on string panics · aff91f7b
    Daniel Martí authored
    Since qp uses panics as an error mechanism, the top-level functions
    recover those errors to return them normally.
    
    However, this blows up if, internally, an ipld.Node implementation
    panics with a value whose type is not error. For example, with:
    
    	panic("some panic message")
    
    One gets:
    
    	panic: some panic message [recovered]
    		panic: interface conversion: string is not error: missing method Error
    
    Fix this by having a fallback for non-error panic values.
    aff91f7b
qp.go 3.54 KB