Missing steps of Characteristic's readValue, writeValue functions

This commit is contained in:
zakorgy 2016-07-05 12:39:51 +02:00 committed by zakorgyula
parent 0ae07e07e6
commit 52e1d8325f
2 changed files with 19 additions and 1 deletions

View file

@ -57,6 +57,8 @@ pub enum Error {
QuotaExceeded,
/// TypeMismatchError DOMException
TypeMismatch,
/// InvalidModificationError DOMException
InvalidModification,
/// TypeError JavaScript Error
Type(String),
@ -97,6 +99,7 @@ pub unsafe fn throw_dom_exception(cx: *mut JSContext, global: GlobalRef, result:
Error::NoModificationAllowed => DOMErrorName::NoModificationAllowedError,
Error::QuotaExceeded => DOMErrorName::QuotaExceededError,
Error::TypeMismatch => DOMErrorName::TypeMismatchError,
Error::InvalidModification => DOMErrorName::InvalidModificationError,
Error::Type(message) => {
assert!(!JS_IsExceptionPending(cx));
throw_type_error(cx, &message);