1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-25 18:33:11 +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
- more UI tests
- base-36 encoding for LZG
- disassembler for uploaded ROMs
WEB WORKER FORMAT

View File

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

View File

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

View File

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

View File

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

View File

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