summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonghun Park <jh718.park@samsung.com>2013-10-28 22:43:35 +0900
committerJoonghun Park <jh718.park@samsung.com>2013-10-28 22:46:00 +0900
commitfc9b31181b16351f070a987b873a2630d098fe78 (patch)
tree98cda23b1e88476a0ae1bcb6ac438499b085d9db
parent88e890e18aa4c2a9451f4fe9792d26ba55a47e14 (diff)
downloadTemporaryStorage-tizen_2.2.tar.gz
TemporaryStorage-tizen_2.2.tar.bz2
TemporaryStorage-tizen_2.2.zip
add QuotaExceedError handling code to saving task part2.2.1_releasetizen_2.2
[title] add QuotaExceedError handling code to saving task part [issue#] N_SE-56524 [problem] Task does not save when Emulator is full memory in TaskManager [solve] add QuotaExceedError handling code to saving task part in JS file Change-Id: Ie285b60adfc3cc7221294871c511ea86d30cf78f
-rwxr-xr-xjs/main.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/js/main.js b/js/main.js
index 5e857df..50001aa 100755
--- a/js/main.js
+++ b/js/main.js
@@ -20,8 +20,14 @@ $(document).ready(function() {
var taskText = $("#txtTask").val();
var plainStr = htmlTagToPlain(taskText);
- // Store localStorage data
- local.setItem(key, plainStr);
+ try {
+ // Store localStorage data
+ local.setItem(key, plainStr);
+ } catch (e) {
+ if (e.code === 22) {
+ alert("Not enough memory.");
+ }
+ }
location.reload();
}
}