aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnanya Sen2012-06-19 16:28:26 -0700
committerAnanya Sen2012-06-19 16:28:26 -0700
commit50ee24fdfade83778f623a2e45effca953931a30 (patch)
treeb8671d1dd99b90bf7655c9de3d835f2d59a98c07
parent1563cf61a61c5d6e77d6e19f1074f661ce1e195b (diff)
downloadninja-50ee24fdfade83778f623a2e45effca953931a30.tar.gz
adding some error handling
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
-rw-r--r--js/controllers/clipboard-controller.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js
index 5e63e424..129e1f89 100644
--- a/js/controllers/clipboard-controller.js
+++ b/js/controllers/clipboard-controller.js
@@ -133,8 +133,20 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
133 this.pasteCounter++; 133 this.pasteCounter++;
134 134
135 if(ninjaData){ 135 if(ninjaData){
136 if(this.copiedObjects.copy){this.pasteFromCopy();} 136 if(this.copiedObjects.copy){
137 else if(this.copiedObjects.cut){this.pasteFromCut();} 137 try{
138 this.pasteFromCopy();
139 }catch(e){
140 console.log(""+e.stack);
141 }
142 }
143 else if(this.copiedObjects.cut){
144 try{
145 this.pasteFromCut();
146 }catch(e){
147 console.log(""+e.stack);
148 }
149 }
138 } 150 }
139 else{ 151 else{
140 152