aboutsummaryrefslogtreecommitdiff
path: root/src/arctica-greeter.vala
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2017-04-18 08:23:00 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-04-18 08:23:00 +0000
commitd70a6935b286ede3d188c50adf755e2fabec747c (patch)
tree12dbb7a2361c8f43b4943a0100c8d02977fafc0b /src/arctica-greeter.vala
parente36ceb6801b3241ec9177cad88eaf12459aa5f7d (diff)
downloadarctica-greeter-d70a6935b286ede3d188c50adf755e2fabec747c.tar.gz
arctica-greeter-d70a6935b286ede3d188c50adf755e2fabec747c.tar.bz2
arctica-greeter-d70a6935b286ede3d188c50adf755e2fabec747c.zip
Handle errors from liblightdm.
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r--src/arctica-greeter.vala56
1 files changed, 50 insertions, 6 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 3800f67..1a500e6 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -59,7 +59,16 @@ public class ArcticaGreeter
greeter = new LightDM.Greeter ();
greeter.show_message.connect ((text, type) => { show_message (text, type); });
greeter.show_prompt.connect ((text, type) => { show_prompt (text, type); });
- greeter.autologin_timer_expired.connect (() => { greeter.authenticate_autologin (); });
+ greeter.autologin_timer_expired.connect (() => {
+ try
+ {
+ greeter.authenticate_autologin ();
+ }
+ catch (Error e)
+ {
+ warning ("Failed to autologin authenticate: %s", e.message);
+ }
+ });
greeter.authentication_complete.connect (() => { authentication_complete (); });
var connected = false;
try
@@ -258,27 +267,62 @@ public class ArcticaGreeter
public void authenticate (string? userid = null)
{
- greeter.authenticate (userid);
+ try
+ {
+ greeter.authenticate (userid);
+ }
+ catch (Error e)
+ {
+ warning ("Failed to authenticate: %s", e.message);
+ }
}
public void authenticate_as_guest ()
{
- greeter.authenticate_as_guest ();
+ try
+ {
+ greeter.authenticate_as_guest ();
+ }
+ catch (Error e)
+ {
+ warning ("Failed to authenticate as guest: %s", e.message);
+ }
}
public void authenticate_remote (string? session, string? userid)
{
- ArcticaGreeter.singleton.greeter.authenticate_remote (session, userid);
+ try
+ {
+ ArcticaGreeter.singleton.greeter.authenticate_remote (session, userid);
+ }
+ catch (Error e)
+ {
+ warning ("Failed to remote authenticate: %s", e.message);
+ }
}
public void cancel_authentication ()
{
- greeter.cancel_authentication ();
+ try
+ {
+ greeter.cancel_authentication ();
+ }
+ catch (Error e)
+ {
+ warning ("Failed to cancel authentication: %s", e.message);
+ }
}
public void respond (string response)
{
- greeter.respond (response);
+ try
+ {
+ greeter.respond (response);
+ }
+ catch (Error e)
+ {
+ warning ("Failed to respond: %s", e.message);
+ }
}
public string authentication_user ()