Giter Site home page Giter Site logo

Errorhandling about softvis3d HOT 11 CLOSED

stefanrinderle avatar stefanrinderle commented on September 26, 2024
Errorhandling

from softvis3d.

Comments (11)

stefanrinderle avatar stefanrinderle commented on September 26, 2024

Currently, i do not see any exceptions in the view. What is part of this review?

from softvis3d.

stefanrinderle avatar stefanrinderle commented on September 26, 2024

TODOs:

  • If an error occurs during the initial loading phase (load metrics) show error with app status component and give retry solutioon
  • If an error occurs during scene layout or loading show error and give settings as retry solution

from softvis3d.

yvo-niedrich avatar yvo-niedrich commented on September 26, 2024

I have moved the WebGLDetection into the app-component, so that WebGL is checked in the initial load process. Can we show the error popup here as well?

The method in question is assertRequirementsAreMet in src/app.tsx.

from softvis3d.

stefanrinderle avatar stefanrinderle commented on September 26, 2024

Error processing and loading done.

  • loading refactored. Loading implemented for
    • SonarQube metric service
    • SonarQube visualization service
    • Layout processing
    • Visualization processing
  • Error handling defined for
    • WebGL detector
    • SonarQube metric service
    • SonarQube visualization service

from softvis3d.

yvo-niedrich avatar yvo-niedrich commented on September 26, 2024

I'll do some tests in the browser tomorrow, but when running the unit tests i get a few warnings:

  • SceneReactions

    (node:9799) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'statusText' of undefined
  • <LoadingQueue/>

    [mobx.array] Attempt to read an array index (0) that is out of bounds (0). Please check length first. Out of bound indices will not be tracked by MobX

from softvis3d.

stefanrinderle avatar stefanrinderle commented on September 26, 2024

The error in the LoadingQueue is because i have to return something in StatusActionQueue.ts on line 45. The example implementations i used did not return a value on done = true because this will not be used anywhere. If i switch to null, everything can be null and this would blow up the code. So i didn't know how to fix that. If you have an idea for this, it would be great.

The error in Scenereactions.spec.ts should be gone now. I mixed up spies and mocks. Now using mocks and no more error messages.

from softvis3d.

yvo-niedrich avatar yvo-niedrich commented on September 26, 2024

Initial Fix

5ddb2f9 fixes the warning. By casting the object a few times, we can fool TypeScript and don't have to access the (possibly) empty array.

return {
    done: true,
    value: undefined
} as any as IteratorResult<T>;

Ultimate Fix

By exposing the iterable interface of the array we don't have to implement the logic ourselfs. Also the return type has been changed from IterableIterator<StatusAction> to IterableIterator<T>, which was actually intended.

public [Symbol.iterator](): IterableIterator<T> {
    return this._queue[Symbol.iterator]();
}

See 474aba5 and 51ed724

from softvis3d.

stefanrinderle avatar stefanrinderle commented on September 26, 2024

Great, thanks for looking into it.

from softvis3d.

yvo-niedrich avatar yvo-niedrich commented on September 26, 2024

Sorry for being so hard on this one. I'm not even certain which criteria were set for this issue / feature. If the problem is to be expected and as such accepted, we can skip it.

When invalidating the JSON from getVisualisation no scene is rendered and no error message displayed. Instead i get a few errors in console.error:
image

Other than that everything works like a charm. The Message + Reload button really useful (for the circumstances).

from softvis3d.

stefanrinderle avatar stefanrinderle commented on September 26, 2024

No worries. I would like to skip this because it's not reproducable without forcing something to break.

But we should keep the error processing in mind at the time we change to the official SQ API for all calls.

from softvis3d.

yvo-niedrich avatar yvo-niedrich commented on September 26, 2024

All right, common errors are processed as expected. Then I'm closing this one.

from softvis3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.