Replies: 1 comment 5 replies
-
Does this work:
ok := fm.TrashItemAtURLResultingItemURLError(fileURL, nil, unsafe.Pointer(&fe))
…On Mon, May 6, 2024 at 8:53 AM Алексей Трофимов ***@***.***> wrote:
I try to write code, that trashes file and I need to get error details if
it fails
func TrashItem(filePath string) error {
fileURL := foundation.NewURLFileURLWithPathIsDirectoryRelativeToURL(filePath, false, nil)
fm := foundation.FileManager_DefaultManager()
var fe = foundation.NewError()
ok := fm.TrashItemAtURLResultingItemURLError(fileURL, nil, fe) // also tried &fe
fmt.Printf("ok=%#v, err=%#v\n", ok, fe)
if fe.IsNil() {
fmt.Printf("is nil\n")
} else {
fmt.Printf("LocalizedDescription=%#v\n", fe.LocalizedDescription())
}
return nil
}
But it panics at fe.LocalizedDescription
SIGSEGV: segmentation violation
PC=0x19093207c m=0 sigcode=2 addr=0x4
signal arrived during cgo execution
I use branch 0.5.0
—
Reply to this email directly, view it on GitHub
<#254>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AETFLRPOIP6AVDVYI4FDU7TZA54K3AVCNFSM6AAAAABHI7OSPKVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGYYTOOBQGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I try to write code, that trashes file and I need to get error details if it fails
But it panics at
fe.LocalizedDescription
I use branch 0.5.0
Beta Was this translation helpful? Give feedback.
All reactions