[Scripting] Throw a error from the Containment when the widget is not found
Summary:
Let's also move the applet pointer to right before it's used and
remove duplicated declarations.
Reviewers: Plasma, davidedmundson
Reviewed By: Plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: Plasma
Differential Revision: https://phabricator.kde.org/D6424