Give a filename instead of blob id in errors when possible.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3809 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
9f75346dd8
commit
ea92fbdcea
@ -237,11 +237,13 @@ async function getProcessBlob(blobId, key, options) {
|
|||||||
process.task.setImports(imports);
|
process.task.setImports(imports);
|
||||||
process.task.activate();
|
process.task.activate();
|
||||||
let source = await getBlobOrContent(blobId);
|
let source = await getBlobOrContent(blobId);
|
||||||
|
var appSourceName = blobId;
|
||||||
var appSource = utf8Decode(source);
|
var appSource = utf8Decode(source);
|
||||||
try {
|
try {
|
||||||
var app = JSON.parse(appSource);
|
var app = JSON.parse(appSource);
|
||||||
if (app.type == "tildefriends-app") {
|
if (app.type == "tildefriends-app") {
|
||||||
var id = app.files["app.js"];
|
appSourceName = 'app.js';
|
||||||
|
var id = app.files[appSourceName];
|
||||||
var blob = await getBlobOrContent(id);
|
var blob = await getBlobOrContent(id);
|
||||||
appSource = utf8Decode(blob);
|
appSource = utf8Decode(blob);
|
||||||
await Promise.all(Object.keys(app.files).map(async function(f) {
|
await Promise.all(Object.keys(app.files).map(async function(f) {
|
||||||
@ -256,7 +258,7 @@ async function getProcessBlob(blobId, key, options) {
|
|||||||
if (process.app) {
|
if (process.app) {
|
||||||
process.app.send({action: "ready"});
|
process.app.send({action: "ready"});
|
||||||
}
|
}
|
||||||
await process.task.execute({name: blobId, source: appSource});
|
await process.task.execute({name: appSourceName, source: appSource});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (process.app) {
|
if (process.app) {
|
||||||
process.app.send({action: 'error', error: error});
|
process.app.send({action: 'error', error: error});
|
||||||
|
Loading…
Reference in New Issue
Block a user