Comments (3)
It does, you can either put a try-catch around it, or a method decorator like below to make this easy to re-use.
module powerbi.extensibility.visual {
export function logExceptions() {
return function (target: any, key: string, value: any) {
return {
value: function () {
let p = window.performance.now();
let result;
try {
result = value.value.apply(this, arguments);
} catch (e) {
console.error(e);
throw e;
}
return result;
}
}
}
}
}
and use it like below on the method you would like to log exceptions for.
@logExceptions()
public update(options: VisualUpdateOptions) {
We'll probably add a module for helpers like these soon enough.
from powerbi-visuals-tools.
Thanks for pointing this out, @Knagis
There are a few techniques you can use for debugging your visual. I've added a page to the docs to explain them all: Debugging Guide
from powerbi-visuals-tools.
This only handles the cases when the error is caused by code directly called from the visual. In this case the decorator approach would work.
However, if I use a library that uses edit: seems to be not truesetTimeout
or requestAnimationFrame
and fails there, the error would still be lost. Perhaps there is a way to get all errors logged by the host to be shown in the console. Even if that shows way too much information it would allow to quickly check if there are any errors when something seems not to be working. The break on caught exceptions
is the minimum solution however it sometimes produces way too much noise.
from powerbi-visuals-tools.
Related Issues (20)
- Visualisation des données de l'agence emploi jeune CI
- Rapport présentant la proportion d'hommes et de femmes qui demandent de l'emploi en CÔTE D'IVOIRE.
- Rapport montrant la répartition des produits de consommation en Côte d’Ivoire HOT 1
- Unable to create visual; HOT 4
- Unable to create visual HOT 1
- unable to install pbiviz HOT 1
- If a visual filtered by a date type field, then the selection is not working well. HOT 1
- Packed visual behaves differently. DataViewMetadata has different entries for the same data mapping in dev/prod mode HOT 2
- Passing query parameter to server HOT 3
- Capabilitie of ImageUpload HOT 1
- geolocation error - disabled by default (feature request) HOT 6
- tsconfig parsing breaks if you include any comments HOT 1
- The 'Show DatavView' button does not work HOT 2
- Tutorial on creating an R-powered Power BI visual is not updated HOT 5
- API Dialog box HOT 7
- pbiviz package -> [ERR_REQUIRE_ESM]: require() of ES Module HOT 7
- Total and Subtotal API not working with select-for-in expression in the data view mapping of the matrix object
- powerbi-client + custom visual. Setting border value HOT 5
- [>= 5.4.2] Uncaught ReferenceError: global is not defined HOT 2
- Custom Visual Library Support for Open AI in Power BI Web HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powerbi-visuals-tools.