BIG WIP of refactoring my work in TS

This commit is contained in:
David MAECHLER 2020-04-07 10:08:04 +02:00
parent af5d2a5a97
commit fbfc208129
12 changed files with 274 additions and 11 deletions

View file

@ -87,7 +87,8 @@ export class IoSocketController{
//Hydrate and manage error
hydrateMessageReceive(message : string) : MessageUserPosition | Error{
try {
return new MessageUserPosition(message);
let data = JSON.parse(message);
return new MessageUserPosition(data);
}catch (err) {
//TODO log error
return new Error(err);