| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 return; | 73 return; |
| 74 } | 74 } |
| 75 | 75 |
| 76 m_exception.set(m_isolate, exception); | 76 m_exception.set(m_isolate, exception); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void ExceptionState::throwTypeError(const String& message) | 79 void ExceptionState::throwTypeError(const String& message) |
| 80 { | 80 { |
| 81 ASSERT(m_isolate); | 81 ASSERT(m_isolate); |
| 82 m_code = TypeError; | 82 m_code = TypeError; |
| 83 setException(V8ThrowException::createTypeError(message, m_isolate)); | 83 setException(V8ThrowException::createTypeError(addExceptionContext(message),
m_isolate)); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void TrackExceptionState::throwDOMException(const ExceptionCode& ec, const Strin
g& message) | 86 void TrackExceptionState::throwDOMException(const ExceptionCode& ec, const Strin
g& message) |
| 87 { | 87 { |
| 88 m_code = ec; | 88 m_code = ec; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void TrackExceptionState::throwTypeError(const String&) | 91 void TrackExceptionState::throwTypeError(const String&) |
| 92 { | 92 { |
| 93 m_code = TypeError; | 93 m_code = TypeError; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 113 processedMessage = ExceptionMessages::failedToGet(propertyName(), in
terfaceName(), message); | 113 processedMessage = ExceptionMessages::failedToGet(propertyName(), in
terfaceName(), message); |
| 114 else if (m_context == SetterContext) | 114 else if (m_context == SetterContext) |
| 115 processedMessage = ExceptionMessages::failedToSet(propertyName(), in
terfaceName(), message); | 115 processedMessage = ExceptionMessages::failedToSet(propertyName(), in
terfaceName(), message); |
| 116 } else if (!propertyName() && interfaceName() && m_context == ConstructionCo
ntext) { | 116 } else if (!propertyName() && interfaceName() && m_context == ConstructionCo
ntext) { |
| 117 processedMessage = ExceptionMessages::failedToConstruct(interfaceName(),
message); | 117 processedMessage = ExceptionMessages::failedToConstruct(interfaceName(),
message); |
| 118 } | 118 } |
| 119 return processedMessage; | 119 return processedMessage; |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace WebCore | 122 } // namespace WebCore |
| OLD | NEW |