Skip to content

Error notification #6

@mbujes

Description

@mbujes

En vez de mostrar los errores en consola, porqué no mostrarlos como notificaciones?

He usado para ello el plugin de jquery Noty

enlace:

http://kif.arkasoftware.com/threejs/htmleditor

} catch ( error ) {

                var lineNumber = error.lineNumber + lineStart;
                errorLines.push( lineNumber );

                editor.setLineClass( lineNumber, null, 'errorLine' );

                var string=  'Line ' + ( lineNumber + 1 ) + ': ' + error.string;
                console.log( string);

                 notty = window.noty({text: string, closeWith: ['click'], layout:'bottomRight',type:'error', dismissQueue: true,force: true});
            }

            // console.log( errors );
            if (errorLines.length==0){
                $.noty.closeAll() 
                notty = window.noty({text: "OK. No errors detected", closeWith: ['click'], layout:'bottomRight',type:'success',timeout:5000, dismissQueue: true,force: true});

            }
            return errorLines.length === 0;

        };

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions