Add diagnostic for common sentry errors

This commit is contained in:
John Firebaugh
2013-04-23 11:23:32 -07:00
parent d8751fad8d
commit 781f540b3c
4 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ iD.actions.Circularize = function(wayId, projection, count) {
};
action.disabled = function(graph) {
if (!graph.entity(wayId).isClosed())
if (!graph.entity(wayId, true).isClosed())
return 'not_closed';
};
+1 -1
View File
@@ -128,7 +128,7 @@ iD.actions.Orthogonalize = function(wayId, projection) {
};
action.disabled = function(graph) {
if (!graph.entity(wayId).isClosed())
if (!graph.entity(wayId, true).isClosed())
return 'not_closed';
};
+6 -2
View File
@@ -31,8 +31,12 @@ iD.Graph = function(other, mutable) {
};
iD.Graph.prototype = {
entity: function(id) {
return this.entities[id];
entity: function(id, log) {
var entity = this.entities[id];
if (!entity && log && typeof Raven !== 'undefined') {
Raven.captureMessage('entity not found', {tags: {id: id, entity: entity, base: this.base().entities[id]}});
}
return entity;
},
transient: function(entity, key, fn) {
+1 -1
View File
@@ -78,7 +78,7 @@ window.iD = function () {
};
context.geometry = function(id) {
return context.entity(id).geometry(history.graph());
return context.entity(id, true).geometry(history.graph());
};
/* Modes */