diff options
author | Joonghun Park <jh718.park@samsung.com> | 2013-10-28 22:43:35 +0900 |
---|---|---|
committer | Joonghun Park <jh718.park@samsung.com> | 2013-10-28 22:46:00 +0900 |
commit | fc9b31181b16351f070a987b873a2630d098fe78 (patch) | |
tree | 98cda23b1e88476a0ae1bcb6ac438499b085d9db | |
parent | 88e890e18aa4c2a9451f4fe9792d26ba55a47e14 (diff) | |
download | TemporaryStorage-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-x | js/main.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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();
}
}
|