Sha256: 38786a762c4c791c92e4e32354304fc626b68bcfb9cc11b494cce7606bae3df9

Contents?: true

Size: 465 Bytes

Versions: 9

Compression:

Stored size: 465 Bytes

Contents

rbbt.exception = {}

rbbt.exception.null = function(variable, text){
  if (variable == null) throw(text)
}

rbbt.exception.report = function(err){
  console.log("Error: " + err)
  rbbt.modal.controller().error(err, "Application Error")
}

rbbt.try = function(func){
  var f = function(){
    try {
      return func.apply(this, arguments)
    }catch(err){
      rbbt.exception.report(err)
    }
  }
  return f
}

rbbt.do_try = function(func){
  rbbt.try(func)()
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rbbt-rest-1.6.28 share/views/public/js/rbbt.exception.js
rbbt-rest-1.6.26 share/views/public/js/rbbt.exception.js
rbbt-rest-1.6.25 share/views/public/js/rbbt.exception.js
rbbt-rest-1.6.24 share/views/public/js/rbbt.exception.js
rbbt-rest-1.6.23 share/views/public/js/rbbt.exception.js
rbbt-rest-1.6.22 share/views/public/js/rbbt.exception.js
rbbt-rest-1.6.21 share/views/public/js/rbbt.exception.js
rbbt-rest-1.6.20 share/views/public/js/rbbt.exception.js
rbbt-rest-1.6.19 share/views/public/js/rbbt.exception.js