Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better errors, with code, computer error string, and human readable error message?! #7

Open
Nostradamos opened this issue Aug 22, 2017 · 1 comment

Comments

@Nostradamos
Copy link
Owner

Nostradamos commented Aug 22, 2017

{
  error: {
    code: 'ERR_THIS_IS_AN_ERROR',
    message: 'This is an error'
  }
}
@Nostradamos Nostradamos added this to the P2 Refactor/Improvement milestone Aug 22, 2017
@Nostradamos Nostradamos added the p1 label Sep 26, 2017
@Nostradamos
Copy link
Owner Author

controller/generic/generic-delete.js:        if (_.isNil(criteria)) throw Error('No criteria object passed');
controller/journal/journal-create.js:                    throw Error('Journal can only be assigned to a plant OR medium OR environment');
controller/journal/journal-create.js:            throw Error('A journal has to be assigned to a plant, medium or environment. Therefore options.plantId,mediumId or environmentId has to be set');
utils/utils.js:    throw Error('plantJournal is not connected to database.');
controller/generic/generic-delete.js:        if (_.isNil(criteria)) throw Error('No criteria object passed');
controller/journal/journal-create.js:                    throw Error('Journal can only be assigned to a plant OR medium OR environment');
controller/journal/journal-create.js:            throw Error('A journal has to be assigned to a plant, medium or environment. Therefore options.plantId,mediumId or environmentId has to be set');
utils/utils.js:    throw Error('plantJournal is not connected to database.');
[kerle@guten-abend-nsa src]$ grep -r "throw new Error" * 
apply-where/translate-operators-journal-value.js:                throw new Error(
apply-where/apply-where.js:        throw new Error(
controller/genotype/genotype-update.js:                throw new Error('update.generationId does not reference an existing Generation');
controller/genotype/genotype-create.js:                throw new Error('options.generationId does not reference an existing Generation');
controller/generic/generic-update.js:        if (_.isUndefined(update) && _.isUndefined(criteria)) throw new Error('No Update and Critera Object got passed');
controller/generic/generic-update.js:        if (_.isUndefined(criteria)) throw new Error('No Criteria Object got passed');
controller/medium/medium-create.js:                throw new Error('options.environmentId does not reference an existing environment');
controller/generation/generation-update.js:                throw new Error('update.generationParents does not reference to existing Plants. At least one reference is invalid.');
controller/generation/generation-update.js:                throw new Error('update.familyId does not reference an existing Family');
controller/generation/generation-create.js:                throw new Error(
controller/generation/generation-create.js:                throw new Error('options.generationParents contains at least one plantId which does not reference an existing plant');
controller/plant/plant-create.js:            throw new Error(
controller/plant/plant-create.js:                throw new Error('options.plantClonedFrom does not reference an existing Plant');
controller/plant/plant-create.js:                throw new Error('options.genotypeId does not reference an existing Genotype');
controller/plant/plant-update.js:                throw new Error('update.genotypeId or update.plantClonedFrom does not reference an existing genotype/plant');
pj.js:            throw new Error('SQLite Database does not support foreign keys. Recompile with foreign_keys support!');
pj.js:            if (row.test !== 42) throw new Error('Your sqlite3 install doesn\'t support JSON. We can\'t continue. '+JSON.stringify(row));
utils/utils.js:        throw new Error(prefix + ' has to be an associative array');
utils/utils.js:        throw new Error(name + '.' + property + ' has to be a string');
utils/utils.js:        throw new Error(name + '.' + property + ' has to be an integer');
utils/utils.js:        throw new Error(
utils/utils.js:        throw new Error(
utils/utils.js:        throw new Error(name + '.' + property + ' has to be set');
utils/utils-expression.js:        throw new Error('Illegal type: '+ type);
utils/utils-query.js:                throw new Error('Unimplemented childAttribute');
utils/utils-query.js:            throw new Error('Illegal attribute: ' + attr);
utils/utils-query.js:            throw new Error('Illegal sort type: ' + _.split(sortStr, ' ')[1]);
utils/utils-query.js:        throw new Error('cannot associate attribute with a table');

@Nostradamos Nostradamos modified the milestones: P2 Refactor/Improvement, Ready for frontend development Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant