From a65c7bdc583c1b1a14f994a566e6d726f7acf0ba Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Wed, 20 Aug 2014 12:24:16 -0600 Subject: [PATCH] fixed console.log messages --- lib/tpk/TPKLayer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tpk/TPKLayer.js b/lib/tpk/TPKLayer.js index cf27c45..8607981 100644 --- a/lib/tpk/TPKLayer.js +++ b/lib/tpk/TPKLayer.js @@ -190,7 +190,7 @@ define([ _validate: function(){ //Verify if basic functionality is supported by the browser if(!window.File && !window.FileReader && !window.Blob && !window.btoa && !window.DataView){ - console.error(new Error( "This library is not supported on your browser!").stack); + console.log("TPKLayer library is not supported by this browser"); this.emit(this.VALIDATION_EVENT,{msg:this.NO_SUPPORT_ERROR, err : null}); } else{ @@ -202,14 +202,14 @@ define([ { this.store.init(function(result){ if(result == false){ - console.error(new Error( "There was an error initializing the database.").stack); + console.log("There was an error initializing the TPKLayer database"); this.emit(this.DATABASE_ERROR_EVENT,{msg:this.DB_INIT_ERROR, err: null}); } else{ this.store.usedSpace(function(size,err){ var mb = this._bytes2MBs(size.sizeBytes); if(mb > this.MAX_DB_SIZE){ - console.error(new Error( "Database is full!").stack); + console.log("Database is full!"); this.emit(this.DATABASE_ERROR_EVENT,{msg:this.DB_FULL_ERROR,err : err}); } this.emit(this.VALIDATION_EVENT,{msg:this.DB_VALIDATED,err : null}) @@ -220,7 +220,7 @@ define([ } else { - console.error(new Error( "IndexedDB is not supported on your browser.").stack); + console.log("IndexedDB is not supported on your browser."); this.emit(this.VALIDATION_EVENT,{msg:this.NO_SUPPORT_ERROR, err : null}); } }, @@ -456,7 +456,7 @@ define([ that._buffer2Base64(bufferI,pointer,function(result){ if (that._isDBWriteable)that._storeTile(url, result, db,function(success,err){ if(err){ - console.error(new Error( "Error writing to database." + err).stack); + console.log("TPKLayer - Error writing to database." + err.message); that.emit(that.DATABASE_ERROR_EVENT,{msg:"Error writing to database. ", err : err}); } });