[Merge] lp:~ahayzen/content-hub/printing-trusted-export into lp:content-hub

Ken VanDine ken.vandine at canonical.com
Tue Feb 28 14:46:53 UTC 2017


Review: Needs Fixing

See the one inline comment

Diff comments:

> 
> === modified file 'src/com/ubuntu/content/utils.cpp'
> --- src/com/ubuntu/content/utils.cpp	2017-01-25 19:57:28 +0000
> +++ src/com/ubuntu/content/utils.cpp	2017-02-27 14:49:44 +0000
> @@ -231,8 +231,14 @@
>      auto app_id = ual::AppID::find(id.toStdString());

Probably best to add the find call to the try statement as well

>      if (app_id.empty())
>          return nullptr;
> -    auto app = ual::Application::create(app_id, reg);
> -    return app;
> +
> +    try {
> +        auto app = ual::Application::create(app_id, reg);
> +        return app;
> +    } catch (std::runtime_error &e) {
> +        qWarning() << Q_FUNC_INFO << "Unable to create application:" << id;
> +        return nullptr;
> +    }
>  }
>  
>  QMap<QString, QString> info_for_app_id(QString id)


-- 
https://code.launchpad.net/~ahayzen/content-hub/printing-trusted-export/+merge/314141
Your team Ubuntu Phablet Team is subscribed to branch lp:content-hub.



More information about the Ubuntu-reviews mailing list