Skip to content

Error Handling #82

@smizell

Description

@smizell

There needs to be a way to handle errors in Minim. Some options:

Throw JavaScript errors

minim.toElement({ foo: 'bar'})
  .get('a') // Undefined and throws error
  .set('b', 'c')

Create special Minim Error object

With the latter, we can attach methods from every element, and then (try to) mimic promises.

minim.toElement({ foo: 'bar'})
  .get('a') // Undefined and should create an error
  .set('b', 'c') // The error object would simply pass itself along
  .then(function() { console.log('all good') })
  .catch(function(error) { console.log('oops', error) })

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions