コード例 #1
0
ファイル: tpm.go プロジェクト: carriercomm/pond
func (e Error) Code() ErrorCode {
	return ErrorCode(C.Trspi_Error_Code(e.result))
}
コード例 #2
0
ファイル: tpm.go プロジェクト: carriercomm/pond
func (e Error) Error() string {
	return fmt.Sprintf("tpm: layer: %s, code: 0x%x: %s", C.GoString(C.Trspi_Error_Layer(e.result)), C.Trspi_Error_Code(e.result), C.GoString(C.Trspi_Error_String(e.result)))
}