WireCloud provides support for logging error messages from widgets/operators. Those messages will be stored as info associated to the widget/operator and will be used to provide feedback to the user/developer (not only while the developer is testing a widget/operator, but also as part of bug reports).
MashupPlatform.widget.log("This is an error message"); // defaults to MashupPlatform.log.ERROR
MashupPlatform.widget.log("This is also an error message", MashupPlatform.log.ERROR);
MashupPlatform.widget.log("This is a warning message", MashupPlatform.log.WARN);
MashupPlatform.widget.log("This is an info message", MashupPlatform.log.INFO);
WireCloud will provide a visual hint about widgets/operators having problems when a widget/operator calls to the log method using the ERROR level. This is an example of the visual hint for widgets:
Clicking on the alert icon will open the logs view. Anyway, you can always visit this view at any time using the widget's dropdown menu:
The API for logging messages from operators is very similar:
MashupPlatform.operator.log("This is an error message"); // defaults to MashupPlatform.log.ERROR
MashupPlatform.operator.log("This is also an error message", MashupPlatform.log.ERROR);
MashupPlatform.operator.log("This is a warning message", MashupPlatform.log.WARN);
MashupPlatform.operator.log("This is an info message", MashupPlatform.log.INFO);
Since Opertators are not shown in the Editor view, WireCloud provides you graphical elements to inform you when an Operator arises an error. If you are in the Editor view, you will be able to see that an error bag with the number of detected errors appears attached to the Wiring element in the menu, as you can note in the following image:
When you are in the Wiring View, you will easily identify the Operator that caused the error because it will have an alert icon attached as you can be seen in the following picture:
As happened with the widgets, clicking on the alert icon will show you the logs view. In the same way, you can use the widget's dropdown menu at any time to show that view.
Table of Contents | t |
---|---|
Exposé | ESC |
Full screen slides | e |
Presenter View | p |
Source Files | s |
Slide Numbers | n |
Toggle screen blanking | b |
Show/hide slide context | c |
Notes | 2 |
Help | h |