Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: Source/bindings/v8/ExceptionMessages.cpp

Issue 111533002: Have document.evaluate() report TypeError over incorrect resolvers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: The detail argument is no longer optional. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/v8/ExceptionMessages.h ('k') | Source/bindings/v8/custom/V8DocumentCustom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 String ExceptionMessages::failedToDelete(const String& property, const String& t ype, const String& detail) 58 String ExceptionMessages::failedToDelete(const String& property, const String& t ype, const String& detail)
59 { 59 {
60 return "Failed to delete the '" + property + "' property from '" + type + "' : " + detail; 60 return "Failed to delete the '" + property + "' property from '" + type + "' : " + detail;
61 } 61 }
62 62
63 String ExceptionMessages::incorrectPropertyType(const String& property, const St ring& detail) 63 String ExceptionMessages::incorrectPropertyType(const String& property, const St ring& detail)
64 { 64 {
65 return "The '" + property + "' property " + detail; 65 return "The '" + property + "' property " + detail;
66 } 66 }
67 67
68 String ExceptionMessages::incorrectArgumentType(int argumentIndex, const String& detail)
69 {
70 return "The " + ordinalNumber(argumentIndex) + " argument " + detail;
71 }
72
68 String ExceptionMessages::notAnArrayTypeArgumentOrValue(int argumentIndex) 73 String ExceptionMessages::notAnArrayTypeArgumentOrValue(int argumentIndex)
69 { 74 {
70 String kind; 75 String kind;
71 if (argumentIndex) // method argument 76 if (argumentIndex) // method argument
72 kind = ordinalNumber(argumentIndex) + " argument"; 77 kind = ordinalNumber(argumentIndex) + " argument";
73 else // value, e.g. attribute setter 78 else // value, e.g. attribute setter
74 kind = "value provided"; 79 kind = "value provided";
75 return "The " + kind + " is neither an array, nor does it have indexed prope rties."; 80 return "The " + kind + " is neither an array, nor does it have indexed prope rties.";
76 } 81 }
77 82
(...skipping 27 matching lines...) Expand all
105 break; 110 break;
106 case 3: 111 case 3:
107 if (number % 100 != 13) 112 if (number % 100 != 13)
108 suffix = "rd"; 113 suffix = "rd";
109 break; 114 break;
110 } 115 }
111 return String::number(number) + suffix; 116 return String::number(number) + suffix;
112 } 117 }
113 118
114 } // namespace WebCore 119 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/ExceptionMessages.h ('k') | Source/bindings/v8/custom/V8DocumentCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698