Permalink
Browse files

Created basic errors package and linked it in.

sidebar9-5-1
  • Loading branch information...
tmeasday committed Apr 10, 2013
1 parent b9f7042 commit 7ee9b2261b1569137a4da76335d68d583a500224
Showing with 1,938 additions and 27 deletions.
  1. +1 −0 .meteor/packages
  2. +2 −0 .meteor/versions
  3. +0 −6 client/helpers/errors.js
  4. +1 −1 client/templates/application/layout.html
  5. +0 −12 client/templates/includes/errors.js
  6. +2 −2 client/templates/posts/post_edit.js
  7. +2 −2 client/templates/posts/post_submit.js
  8. +1 −0 packages/rss/.npm/package/node_modules/.node_version
  9. +12 −0 packages/rss/.npm/package/node_modules/.npm-shrinkwrap.json
  10. +1 −0 packages/rss/.npm/package/node_modules/.package.json
  11. +1 −0 packages/rss/.npm/package/node_modules/rss/.idea/.name
  12. +3 −0 packages/rss/.npm/package/node_modules/rss/.idea/dictionaries/dylan.xml
  13. +5 −0 packages/rss/.npm/package/node_modules/rss/.idea/encodings.xml
  14. +8 −0 packages/rss/.npm/package/node_modules/rss/.idea/misc.xml
  15. +9 −0 packages/rss/.npm/package/node_modules/rss/.idea/modules.xml
  16. +9 −0 packages/rss/.npm/package/node_modules/rss/.idea/node-rss.iml
  17. +5 −0 packages/rss/.npm/package/node_modules/rss/.idea/scopes/scope_settings.xml
  18. +7 −0 packages/rss/.npm/package/node_modules/rss/.idea/vcs.xml
  19. +493 −0 packages/rss/.npm/package/node_modules/rss/.idea/workspace.xml
  20. +1 −0 packages/rss/.npm/package/node_modules/rss/.npmignore
  21. +22 −0 packages/rss/.npm/package/node_modules/rss/LICENSE
  22. +91 −0 packages/rss/.npm/package/node_modules/rss/lib/rss.js
  23. +2 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/.npmignore
  24. +5 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/.travis.yml
  25. +22 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/LICENSE
  26. +81 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/examples/examples.js
  27. +24 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/examples/server.js
  28. +18 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/lib/escapeForXML.js
  29. +275 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/lib/xml.js
  30. +82 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/package.json
  31. +210 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/readme.md
  32. +98 −0 packages/rss/.npm/package/node_modules/rss/node_modules/xml/test/xml.test.js
  33. +59 −0 packages/rss/.npm/package/node_modules/rss/package.json
  34. +119 −0 packages/rss/.npm/package/node_modules/rss/readme.md
  35. +107 −0 packages/rss/.npm/package/node_modules/rss/test/test.js
  36. +1 −0 packages/tmeasday:errors/.gitignore
  37. +8 −0 packages/tmeasday:errors/errors.js
  38. +4 −4 client/templates/includes/errors.html → packages/tmeasday:errors/errors_list.html
  39. +12 −0 packages/tmeasday:errors/errors_list.js
  40. +16 −0 packages/tmeasday:errors/package.js
  41. +119 −0 packages/tmeasday:errors/versions.json
View
@@ -24,3 +24,4 @@ accounts-password
ian:accounts-ui-bootstrap-3
check
audit-argument-checks
+tmeasday:errors
View
@@ -56,6 +56,7 @@ mobile-experience@1.0.1
mobile-status-bar@1.0.6
mongo@1.1.2
mongo-id@1.0.1
+mongo-livedata@1.0.9
npm-bcrypt@0.7.8_2
npm-mongo@1.4.39_1
observe-sequence@1.0.7
@@ -79,6 +80,7 @@ standard-minifiers@1.0.1
stylus@2.511.0_2
templating@1.1.4
templating-tools@1.0.0
+tmeasday:errors@1.0.0
tracker@1.0.9
twbs:bootstrap@3.3.5
ui@1.0.8
View
@@ -1,6 +0,0 @@
-// Local (client-only) collection
-Errors = new Mongo.Collection(null);
-
-throwError = function(message) {
- Errors.insert({message: message})
-}
@@ -1,7 +1,7 @@
<template name="layout">
<div class="container">
{{> header}}
- {{> errors}}
+ {{> meteorErrors}}
<div id="main">
{{> yield}}
</div>
@@ -1,12 +0,0 @@
-Template.errors.helpers({
- errors: function() {
- return Errors.find();
- }
-});
-
-Template.error.onRendered(function() {
- var error = this.data;
- Meteor.setTimeout(function () {
- Errors.remove(error._id);
- }, 3000);
-});
@@ -29,7 +29,7 @@ Template.postEdit.events({
Posts.update(currentPostId, {$set: postProperties}, function(error) {
if (error) {
// display the error to the user
- throwError(error.reason);
+ Errors.throw(error.reason);
} else {
Router.go('postPage', {_id: currentPostId});
}
@@ -45,4 +45,4 @@ Template.postEdit.events({
Router.go('postsList');
}
}
-});
+});
@@ -27,11 +27,11 @@ Template.postSubmit.events({
Meteor.call('postInsert', post, function(error, result) {
// display the error to the user and abort
if (error)
- return throwError(error.reason);
+ return Errors.throw(error.reason);
// show this result but route anyway
if (result.postExists)
- throwError('This link has already been posted');
+ Errors.throw('This link has already been posted');
Router.go('postPage', {_id: result._id});
});

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 7ee9b22

Please sign in to comment.