1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-12 03:29:31 +00:00

fixed bug where errors pile up

This commit is contained in:
Steven Hugg 2018-07-06 01:42:01 -05:00
parent 79e77751ee
commit dc40d1b040
6 changed files with 17 additions and 12 deletions

View File

@ -44,6 +44,7 @@ TODO:
- unify versioning - unify versioning
- more UI tests - more UI tests
- base-36 encoding for LZG - base-36 encoding for LZG
- disassembler for uploaded ROMs
WEB WORKER FORMAT WEB WORKER FORMAT

View File

@ -26,9 +26,11 @@ body {
<link rel="stylesheet" href="css/ui.css"> <link rel="stylesheet" href="css/ui.css">
<script> <script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-54497476-9', 'auto'); if (window.location.host.endsWith('8bitworkshop.com')) {
ga('set', 'anonymizeIp', true); ga('create', 'UA-54497476-9', 'auto');
ga('send', 'pageview'); ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
}
</script> </script>
<script async src='https://www.google-analytics.com/analytics.js'></script> <script async src='https://www.google-analytics.com/analytics.js'></script>
</head> </head>

View File

@ -5,6 +5,7 @@ var NES_NESLIB_PRESETS = [
{id:'neslib2.c', name:'Sprites'}, {id:'neslib2.c', name:'Sprites'},
{id:'neslib3.c', name:'Cursor'}, {id:'neslib3.c', name:'Cursor'},
{id:'neslib4.c', name:'Metasprites'}, {id:'neslib4.c', name:'Metasprites'},
{id:'chase/game.c', name:'Chase (example game)'},
]; ];
var NES_CONIO_PRESETS = [ var NES_CONIO_PRESETS = [

View File

@ -126,7 +126,8 @@ export class CodeProject {
this.tools_preloaded[tool] = true; this.tools_preloaded[tool] = true;
} }
} }
// TODO: support link-time and compile-time (include) dependencies
parseFileDependencies(text:string):string[] { parseFileDependencies(text:string):string[] {
var files = []; var files = [];
if (this.platform_id == 'verilog') { if (this.platform_id == 'verilog') {
@ -192,7 +193,7 @@ export class CodeProject {
} else { } else {
this.store.getItem(path, (err, value) => { this.store.getItem(path, (err, value) => {
if (err) { if (err) {
callback(err); callback(err, result);
} else if (value) { } else if (value) {
result.push({ result.push({
path:path, path:path,
@ -217,7 +218,7 @@ export class CodeProject {
loadNext(); loadNext();
}, 'text') }, 'text')
.fail(function() { .fail(function() {
callback("Could not load preset " + path); callback("Could not load preset " + path, result);
}); });
} }
}); });
@ -244,6 +245,7 @@ export class CodeProject {
if (err) { if (err) {
console.log(err); // TODO? console.log(err); // TODO?
} }
if (!depends) depends = [];
if (this.platform_id == 'verilog') { if (this.platform_id == 'verilog') {
// TODO: should get rid of this msg format // TODO: should get rid of this msg format
this.worker.postMessage({ this.worker.postMessage({

View File

@ -748,12 +748,10 @@ function installErrorHandler() {
window.onerror = function (msgevent, url, line, col, error) { window.onerror = function (msgevent, url, line, col, error) {
console.log(msgevent, url, line, col); console.log(msgevent, url, line, col);
console.log(error); console.log(error);
if (window.location.host.endsWith('8bitworkshop.com')) { ga('send', 'exception', {
ga('send', 'exception', { 'exDescription': msgevent + " " + url + " " + " " + line + ":" + col + ", " + error,
'exDescription': msgevent + " " + url + " " + " " + line + ":" + col + ", " + error, 'exFatal': true
'exFatal': true });
});
}
alert(msgevent+""); alert(msgevent+"");
}; };
} }

View File

@ -114,6 +114,7 @@ function SourceEditor(path, mode) {
editor.clearGutter("gutter-info"); editor.clearGutter("gutter-info");
refreshDebugState(); refreshDebugState();
dirtylisting = true; dirtylisting = true;
lines2errmsg = [];
} }
self.getSourceFile = function() { return sourcefile; } self.getSourceFile = function() { return sourcefile; }