Pre loader

How do I catch an exception that occurs within SciChart?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

I purposely gave SciChart a bad axis ID with: fastLineRenderableSeries.YAxisId = “asdf”;

When I run my application within Visual Studio, Visual Studio throws this exception:

A first chance exception of type ‘System.InvalidOperationException’ occurred in Abt.Controls.SciChart.Wpf.dll. AxisCollection.GetAxisById(‘asdf’) returned no axis with ID=asdf. Please check you have added an axis with this Id to the AxisCollection

But when I run my compiled exe I don’t even get an unhandled exception error. SciChart simply doesn’t draw the chart. I want to catch this exception but my attempts to set up a try/catch have failed.

Is there a way for me to catch this sort of exception so I can log it?

  • You must to post comments
0
0

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • Edward Robertson
    So, if I understand your response, there is currently no way for me to log that error in my app. It would be nice is SciChart created something for this. For example, an event I can subscribe to that delivers the error message.
  • Andrew Burnett-Thompson
    Yes that is correct, the exception occurs in an asynchronous part of the code, and is caught, so that your application remains unaffected. What do you want to validate here? Our intention of throwing at design time is to ensure that errors like this (which are usually developer errors) are caught at design time before the application is shipped.
  • Edward Robertson
    I'm creating a generic line chart that sets up axis, range, etc., based on data. Because of the many possible combinations of settings, I'm concerned that I could make a programming error that would elude me during testing. The ability to log the rendering error in the field could be an invaluable clue when debugging.
  • Andrew Burnett-Thompson
    Aha, that makes sense. It would be little effort for us to add a callback, but I can't guarantee when we can do this, as any change has to be thoroughly tested. What I suggest as a stop-gap for you is create a watcher class which attaches to a SciChartSurface, subscribes to the rendered event, then checks each RenderableSeries.YAxisId, XAxisId exists in the SciChartSurface.XAxes, YAxes collection. You could get a notification immediately and allow you to catch issues early.
  • Edward Robertson
    Considering all the possible rendering errors, your stop gap would be a pretty big job. My users are all in house so a failure to render isn't a huge deal. Thanks for considering my request.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies