::elm_init(argc, argv);
::elm_scale_set(1.8);
- if (!strncmp(argv[1], "progress", sizeof("progress"))) {
- if (argc < 4) {
- return -1;
+ try {
+ if (!strncmp(argv[1], "progress", sizeof("progress"))) {
+ if (argc < 4) {
+ return -1;
+ }
+ createProgressInterface(argv[2], argv[3]);
+ } else if (!strncmp(argv[1], "lock", sizeof("lock"))) {
+ createPasswordInterface();
}
- createProgressInterface(argv[2], argv[3]);
- } else if (!strncmp(argv[1], "lock", sizeof("lock"))) {
- createPasswordInterface();
+ } catch (runtime::Exception &e) {
+ dlog_print(DLOG_ERROR, LOG_TAG, "Error: %s", e.what());
+ return -1;
}
::elm_run();