|
@@ -29,12 +29,6 @@ export class CommandParser {
|
|
return new CommandMessageInspectObject();
|
|
return new CommandMessageInspectObject();
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- [
|
|
|
|
- "message:scene_tree",
|
|
|
|
- function () {
|
|
|
|
- return new CommandMessageSceneTree();
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
[
|
|
[
|
|
"stack_dump",
|
|
"stack_dump",
|
|
function () {
|
|
function () {
|
|
@@ -126,9 +120,23 @@ export class CommandParser {
|
|
this.parameters.push(dataset.shift());
|
|
this.parameters.push(dataset.shift());
|
|
if (this.current_command.param_count !== -1) {
|
|
if (this.current_command.param_count !== -1) {
|
|
if (this.current_command.param_count === this.parameters.length) {
|
|
if (this.current_command.param_count === this.parameters.length) {
|
|
- this.current_command.trigger(this.parameters);
|
|
|
|
- this.current_command = undefined;
|
|
|
|
|
|
+ try {
|
|
|
|
+ this.current_command.trigger(this.parameters);
|
|
|
|
+ } catch (e) {
|
|
|
|
+ // FIXME: Catch exception during trigger command: TypeError: class_name.replace is not a function
|
|
|
|
+ // class_name is the key of Mediator.inspect_callbacks
|
|
|
|
+ console.error("Catch exception during trigger command: " + e);
|
|
|
|
+ } finally {
|
|
|
|
+ this.current_command = undefined;
|
|
|
|
+ this.parameters = [];
|
|
|
|
+ }
|
|
|
|
+ } else if(this.current_command.param_count < this.parameters.length) {
|
|
|
|
+ // we debugged that an exception occures during this.current_command.trigger(this.parameters)
|
|
|
|
+ // because we do not understand the root cause of the exception, we set the current command to undefined
|
|
|
|
+ // to avoid a infinite loop of parse_message(...)
|
|
|
|
+ this.current_command = undefined
|
|
this.parameters = [];
|
|
this.parameters = [];
|
|
|
|
+ console.log("Exception not catched. Reset current_command to avoid infinite loop.")
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.current_command.param_count = this.parameters.shift();
|
|
this.current_command.param_count = this.parameters.shift();
|