private boolean isLuaErr(int err, LuaState ls){
        if(err != 0 || this.isDebug())
        {
          switch (err)
          {
            case 1 :{
              log(pluginName+ "Runtime error. " + ls.toString(-1));
              return true;}

            case 2 :{
              log(pluginName+" File not found or error in lua function: " + ls.toString(-1));
              return true;}

            case 3 :{
              log(pluginName+" Syntax error. " + ls.toString(-1));
              return true;}

            case 4 :{
              log(pluginName+" Memory error. " + ls.toString(-1));
              return true;}

            default :{
              log(pluginName+" Error. " + ls.toString(-1));
              return true;}
          }
        }
        return false;
    }