You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After deleting successfully an item from keychain an error code is raised resulting in exception in C# code.
I run on this problem while testing the C# code on Windows.
Program.cs
using System;namespaceKeySharp{internalclassProgram{staticvoidMain(string[]args){
Keyring.SetPassword("Lalala","Test","thisuser","Neone");try{varpassword= Keyring.GetPassword("Lalala","Test","thisuser");
Console.WriteLine(password);}catch(KeyringExceptionex){
Console.WriteLine(ex.Message);}
Keyring.DeletePassword("Lalala","Test","thisuser");}}}
Output:
Neone
Unhandled Exception: KeySharp.KeyringException: (NoError)
at KeySharp.Keyring.ThrowLastError() in C:\Users\user\Source\Repos\KeySharp\KeySharp\Keyring.cs:line 114at KeySharp.Keyring.DeletePassword(String package, String service, String username) in C:\Users\user\Source\Repos\KeySharp\KeySharp\Keyring.cs:line 84at KeySharp.Program.Main(String[] args) in C:\Users\user\Source\Repos\KeySharp\KeySharp\Program.cs:line 18
The fix I am suggesting is changing the 50th line of main.cpp to if (error->type != keychain::ErrorType::NoError) similar to other functions.
I have not actually tested the change I am suggesting but I am pretty sure this is where the error occurs(I'll try to re-compile the C++ code to test it). It would be awesome if you could verify.
The text was updated successfully, but these errors were encountered:
After deleting successfully an item from keychain an error code is raised resulting in exception in C# code.
I run on this problem while testing the C# code on Windows.
Program.cs
Output:
The fix I am suggesting is changing the 50th line of main.cpp to
if (error->type != keychain::ErrorType::NoError)
similar to other functions.I have not actually tested the change I am suggesting but I am pretty sure this is where the error occurs(I'll try to re-compile the C++ code to test it). It would be awesome if you could verify.
The text was updated successfully, but these errors were encountered: