github.com/vmware/govmomi@v0.51.0/task/error.go (about)

     1  // © Broadcom. All Rights Reserved.
     2  // The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
     3  // SPDX-License-Identifier: Apache-2.0
     4  
     5  package task
     6  
     7  import "github.com/vmware/govmomi/vim25/types"
     8  
     9  type Error struct {
    10  	*types.LocalizedMethodFault
    11  	Description *types.LocalizableMessage
    12  }
    13  
    14  // Error returns the task's localized fault message.
    15  func (e Error) Error() string {
    16  	return e.LocalizedMethodFault.LocalizedMessage
    17  }
    18  
    19  func (e Error) Fault() types.BaseMethodFault {
    20  	return e.LocalizedMethodFault.Fault
    21  }