PageRenderTime 13ms queryFilters 1ms Sphinxql 2824ms GetByIds 33ms meta 0ms repositoryFilters 4ms languageFilters 8ms sourceFilters 1ms

14,015,232 results for 'ERROR repo:zerowidth/integrity' (13 ms)

Source

Language

Repository

error.js https://github.com/leancloud/javascript-sdk.git | JavaScript | 346 lines
7   * Constructs a new AV.Error object with the given code and message.
8   * @param {Number} code An error code constant from <code>AV.Error</code>.
9   * @param {String} message A detailed description of the error.
20    /**
21     * Error code indicating some error other than those enumerated here.
22     * @constant
198    /**
199     * Error code indicating an error saving a file.
200     * @constant
204    /**
205     * Error code indicating an error deleting a file.
206     * @constant
335    /**
336     * Error code indicating a real error code is unavailable because
337     * we had to use an XDomainRequest object to allow CORS requests in
2013-08-26-mastering-async-error-handling-with-promises.md https://github.com/lidaling/nuysoft.github.com.git | Markdown | 469 lines
12
13<!-- As we saw in [Async Programming is Messy](http://know.cujojs.com/tutorials/async/async-programming-is-messy.html.md), error handling in callback-based asynchronous code gets messy quickly, and loses many of the qualities of synchronous code that make it familiar and easier to reason about. In [Simplifying Async with Promises](http://know.cujojs.com/tutorials/async/simplifying-async-with-promises.html.md), we introduced Promises and saw how they restore call-and-return semantics, allow errors to propagate up the stack similarly to synchronous exceptions, and generally provide a cleaner approach to managing asynchrony, especially when handling errors. -->
14正如我们在 [凌乱的异步编程](/2013/08/26/async-programming-is-messy/) 一文中看到的,基于回调函数的异步代码很快变得混乱起来,并且大大降低了同步代码部分的质量,从而更容易导致错误。在 [用 Promises 简化异步编程](/2013/08/27/simplifying-async-with-promises/) 一文中,我们引入了 Promises,看到了它们如何恢复调用-返回编程模型,并且提供一种更清晰方法来管理异步,特别是在处理错误时。
221
222<!-- While `alwaysCleanupWrapper` prevents `alwaysCleanup` from accessing the result or error, it still allows `alwaysCleanup` to turn an error condition into a successful result. For example, if `recoverFromFailure` produces an error, it will be passed to `alwaysCleanupWrapper`, which will then call `alwaysCleanup`. If `alwaysCleanup` returns successfully, the result will be propagated to the caller, thus squelching the previous error. -->
223虽然 `alwaysCleanupWrapper` 阻止了 `alwaysCleanup` 访问结果或错误,但是它仍然允许 `alwaysCleanup` 把一个错误状态转换一个成功结果。例如,如果 `recoverFromFailure` 产生一个错误,它将被传给 `alwaysCleanupWrapper`,然后调用 `alwaysCleanup`。如果 `alwaysCleanup` 成功返回,返回值将传播到调用者,从而消除了之前的错误。
358    // Assume showError will never fail
359    function showError(error) { /* Show the error, warn the user, etc. */ }
360
392
393<!-- Because Promises propagate errors similarly to exceptions, if `showResult` fails, we will also show an error. So, the automatic the behavior here is also parallel to the synchronous version: We've written single `otherwise` call that will handle errors from either `getTheResult` or `showResult`. -->
394由于 Promises 像传播异常一样传播错误,因此如果 `showResult` 失败了,我们也会展示一个错误。因此,这种自动的行为与同步版本是也是等价的:我们编写的 `otherwise` 单句调用将处理来自 `getTheResult` 和 `showResult` 的错误。
440
441<!--[^1]: You might be wondering why we want this property. For this article, we're choosing to try to model `finally` as closely as possible. The intention of synchronous `finally` is to cause *side effects*, such as closing a file or database connection, and not to transform the result or error by applying a function to it. Also, passing something that *might be a result or might be an error* to `alwaysCleanup` can be a source of hazards without *also* telling `alwaysCleanup` what kind of thing it is receiving. The fact that `finally` doesn't have a "parameter", like `catch` means that the burden is on the developer to grant access to the result or error, usually by storing it in a local variable before execution enters the `finally`. That approach will work for these promise-based approaches as well.-->
442
error.js https://github.com/vastus/blogode.git | JavaScript | 122 lines
59 *
60 * { "stack": "Error: Document update conflict. at gen_err(error.js:14:43)",
61 *   "message": "Document update conflict.",
80 * 
81 * @param {error:error|string} the error or a reason for the error
82 * @param {code:string} the recognizable error code
89function gen_err(scope,error,code,request,status_code) {
90  error       = error             || STATUS_CODES[status_code] || 'Unknown Error';
91  code        = code                                           || 'unknown';
93  request     = request                                        || {};
94  if(typeof error === 'string') { error = new Error(error); }
95  error.error          = code;
106  }
107  error = gen_err('request', error, code, request);
108  if(callback) {
error.js https://github.com/julienbarrier/jappix.git | JavaScript | 140 lines
3Jappix - An open social platform
4These are the error functions for Jappix
5
17	if(condition || reason) {
18		// Initialize the error text
19		var eText = '';
48
49// Handles the error from a packet and return true if any error
50function handleError(packet) {
56	
57	// First level error (connection error)
58	if(node.is('error')) {
109	
110	// Second level error (another error)
111	else if(node.find('error').size()) {
error.c https://github.com/lhz/ruby.git | C | 1,992 lines
1213    }
1214    if (!NIL_P(error)) err = strerror(NUM2INT(error));
1215    else err = "unknown error";
1685    rb_eStandardError = rb_define_class("StandardError", rb_eException);
1686    rb_eTypeError     = rb_define_class("TypeError", rb_eStandardError);
1687    rb_eArgError      = rb_define_class("ArgumentError", rb_eStandardError);
1689    rb_eKeyError      = rb_define_class("KeyError", rb_eIndexError);
1690    rb_eRangeError    = rb_define_class("RangeError", rb_eStandardError);
1691
1717    rb_eEncodingError = rb_define_class("EncodingError", rb_eStandardError);
1718    rb_eEncCompatError = rb_define_class_under(rb_cEncoding, "CompatibilityError", rb_eEncodingError);
1719
1720    syserr_tbl = st_init_numtable();
1721    rb_eSystemCallError = rb_define_class("SystemCallError", rb_eStandardError);
1722    rb_define_method(rb_eSystemCallError, "initialize", syserr_initialize, -1);
error.cpp https://github.com/dfsilva/mconf-mobile.git | C++ | 268 lines
38    va_start(args, description);
39    error = error_addToQueue(ss.str().c_str(), code, ERROR_LEVEL_NORMAL, description, args);
40    va_end(args);
58    va_start(args, description);
59    error = error_addToQueue(ss.str().c_str(), code, ERROR_LEVEL_WARNING, description, args);
60    va_end(args);
101    }
102    error_queue_push(&errors.items, &error);
103
152
153int error_queue_push(error_queue_t *queue, error_t *error)
154{
181    if (error->level == ERROR_LEVEL_NORMAL) {
182        common_logprintf("[ERRO] %06d: \"%s\" (at: %s)", error->code, error->msg, error->atStr);
183        //common_logprintf("[ERRO] %06d: \"%s\"", error->code, error->msg);
error.c https://github.com/eagles125/pyuv.git | C | 69 lines
25    PyExc_UVError = PyErr_NewException("pyuv.error.UVError", NULL, NULL);
26    PyExc_ThreadError = PyErr_NewException("pyuv.error.ThreadError", PyExc_UVError, NULL);
27    PyExc_HandleError = PyErr_NewException("pyuv.error.HandleError", PyExc_UVError, NULL);
29    PyExc_AsyncError = PyErr_NewException("pyuv.error.AsyncError", PyExc_HandleError, NULL);
30    PyExc_TimerError = PyErr_NewException("pyuv.error.TimerError", PyExc_HandleError, NULL);
31    PyExc_PrepareError = PyErr_NewException("pyuv.error.PrepareError", PyExc_HandleError, NULL);
38    PyExc_TTYError = PyErr_NewException("pyuv.error.TTYError", PyExc_StreamError, NULL);
39    PyExc_UDPError = PyErr_NewException("pyuv.error.UDPError", PyExc_HandleError, NULL);
40    PyExc_PollError = PyErr_NewException("pyuv.error.PollError", PyExc_HandleError, NULL);
41    PyExc_FSError = PyErr_NewException("pyuv.error.FSError", PyExc_UVError, NULL);
42    PyExc_FSEventError = PyErr_NewException("pyuv.error.FSEventError", PyExc_HandleError, NULL);
43    PyExc_FSPollError = PyErr_NewException("pyuv.error.FSPollError", PyExc_HandleError, NULL);
43    PyExc_FSPollError = PyErr_NewException("pyuv.error.FSPollError", PyExc_HandleError, NULL);
44    PyExc_ProcessError = PyErr_NewException("pyuv.error.ProcessError", PyExc_HandleError, NULL);
45
script-error.md https://github.com/ilife5/javascript-exception-archives.git | Unknown | 130 lines
23    代码,Firebug 可以提示正确的 `"notExistFunction" is undefined`,
24    但是 onerror 异常事件处理函数中得到的错误消息却是 `Script error.`。
251. 用户脚本(userscript) 异常导致。
115|         | onerror | Script error.                               |              | 0    |
116| Chrome  | console | Uncaught Error: test error on b.            | b.com/b.js   | 3    |
117|         | onerror | Script error.                               |              | 0    |
117|         | onerror | Script error.                               |              | 0    |
118| Safari  | console | Error: test error on b.                     |              |      |
119|         | onerror | undefined                                   |              | 0    |
120| Opera   | console | Uncaught exception: Error: test error on b. | a.com/a.html | 4    |
121|         | onerror | Script error.                               |              | 0    |
122
125
126* [Cryptic “Script Error.” reported in Javascript in Chrome and Firefox](http://stackoverflow.com/questions/5913978/cryptic-script-error-reported-in-javascript-in-chrome-and-firefox)
127* [WebKit source that checks origin](http://trac.webkit.org/browser/branches/chromium/648/Source/WebCore/dom/ScriptExecutionContext.cpp?rev=77122#L301)
error.coffee https://github.com/criquelmes/polychart2.git | CoffeeScript | 47 lines
4
5class DependencyError extends Error
6  constructor: (@message) ->
8
9class ModeError extends Error
10  constructor: (@message) ->
24
25class ScaleError extends Error
26  constructor: (@message) ->
40poly.error.defn = (msg) -> new DefinitionError(msg)
41poly.error.mode = (msg) -> new ModeError(msg)
42poly.error.impl = (msg) -> new NotImplemented(msg)
43poly.error.input = (msg) -> new UnknownInput(msg)
44poly.error.scale = (msg) -> new ScaleError(msg)
45poly.error.missing = (msg) -> new MissingData(msg)
Error.java https://github.com/kanishin/tomcat.git | Java | 99 lines
19
20/** Error
21 *
32     */
33    private final int error;
34
42     *
43     * @param error one of the value in Error
44     * @param description error message
45     */
46    private Error(int error, String description)
47    {
48        super(error + ": " + description);
49        this.error = error;
50        this.description = description;
error-reporting.txt https://github.com/adamkal/django.git | Unknown | 282 lines
1Error reporting
2===============
9However, running with :setting:`DEBUG` set to ``False`` means you'll never see
10errors generated by your site -- everyone will just see your public error pages.
11You need to keep track of errors that occur in deployed sites, so Django can be
16
17Server errors
18~~~~~~~~~~~~~
54Django can also be configured to email errors about broken links (404 "page
55not found" errors). Django sends emails about 404 errors when:
56
121
122Error reports are really helpful for debugging errors, so it is generally
123useful to record as much relevant information about those errors as possible.
279    :ref:`exception middleware <exception-middleware>`. If you do write custom
280    error handling, it's a good idea to emulate Django's built-in error handling
281    and only report/log errors if :setting:`DEBUG` is ``False``.
error-reporting.txt https://github.com/jonathanslenders/django.git | Unknown | 278 lines
1Error reporting
2===============
9However, running with :setting:`DEBUG` set to ``False`` means you'll never see
10errors generated by your site -- everyone will just see your public error pages.
11You need to keep track of errors that occur in deployed sites, so Django can be
16
17Server errors
18~~~~~~~~~~~~~
54Django can also be configured to email errors about broken links (404 "page
55not found" errors). Django sends emails about 404 errors when:
56
119
120Error reports are really helpful for debugging errors, so it is generally
121useful to record as much relevant information about those errors as possible.
275    :ref:`exception middleware <exception-middleware>`. If you do write custom
276    error handling, it's a good idea to emulate Django's built-in error handling
277    and only report/log errors if :setting:`DEBUG` is ``False``.
error-reporting.txt https://github.com/jgeskens/django.git | Unknown | 273 lines
1Error reporting
2===============
9However, running with :setting:`DEBUG` set to ``False`` means you'll never see
10errors generated by your site -- everyone will just see your public error pages.
11You need to keep track of errors that occur in deployed sites, so Django can be
16
17Server errors
18~~~~~~~~~~~~~
54Django can also be configured to email errors about broken links (404 "page
55not found" errors). Django sends emails about 404 errors when:
56
114
115Error reports are really helpful for debugging errors, so it is generally
116useful to record as much relevant information about those errors as possible.
270    :ref:`exception middleware <exception-middleware>`. If you do write custom
271    error handling, it's a good idea to emulate Django's built-in error handling
272    and only report/log errors if :setting:`DEBUG` is ``False``.
error.js https://github.com/sanyaade-gamedev/The-M-Project-Sample-Apps.git | JavaScript | 266 lines
17 *
18 * The root object for Error objects
19 *
19 *
20 * M.Error encapsulates errors in The-M-Project.
21 * Should be passed to error callbacks.
22 *
23 * 0-99:    general errors
24 *
24 *
25 * 100-199: Model and Validation errors
26 *
213
214/* following errors are WebSQL Data Provider errors. */
215
error.py https://github.com/manul7/autotest.git | Python | 520 lines
289
290class BarrierError(JobError):
291    """Indicates an error happened during a barrier operation."""
357
358class AutotestHostRunError(HostRunErrorMixIn, AutotestError):
359    pass
372
373class AutoservRunError(HostRunErrorMixIn, AutoservError):
374    pass
494
495class RepoDiskFullError(PackagingError):
496    'Raised when the destination for packages is full'
498
499class RepoWriteError(PackagingError):
500    "Raised when packager cannot write to a repo's desitnation"
Error.java https://github.com/hcarver/bluecove.git | Java | 354 lines
67    /**
68     * An unexpected error (other than DeviceUnreachable) error has occurred while
69     * attempting a connection to a device.
80     * 
81     * The error messages is taken from the strerror(errno) function.
82     * 
116    /**
117     * Error returned when a memory allocation via malloc() fails. This error is similar
118     * to ENOMEM.
201     * 
202     * Error returned if a record for a specific procedure doesn't exist. The error
203     * message however should indicate the procedure that fails. For example
213    /**
214     * Error returned if an operation is in progress. Since this is a generic error that
215     * can be used in various situations, the error message should be more clear about
error-view.css https://github.com/remohammadi/phabricator.git | CSS | 96 lines
42
43.aphront-error-severity-error {
44  color: {$red};
48
49.aphront-error-severity-error .aphront-error-view-head {
50  color: {$red};
58
59.aphront-error-severity-warning .aphront-error-view-head {
60  color: #bc7837;
68
69.aphront-error-severity-notice .aphront-error-view-head {
70  color: {$blue};
91
92.aphront-dialog-body .aphront-error-view .aphront-error-view-list {
93  margin: 0 0 0 16px;
node.d.ts.for.stopping.console.duplicate.error https://github.com/FlatlinerDOA/OpenQ.git | Unknown | 1,067 lines
358
359    export function deflate(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
360    export function deflateRaw(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
360    export function deflateRaw(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
361    export function gzip(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
362    export function gunzip(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
362    export function gunzip(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
363    export function inflate(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
364    export function inflateRaw(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
364    export function inflateRaw(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
365    export function unzip(buf: NodeBuffer, callback: (error: Error, result) =>void ): void;
366
565        killSignal?: string;
566    }, callback: (error: Error, stdout: NodeBuffer, stderr: NodeBuffer) =>void ): ChildProcess;
567    export function exec(command: string, callback: (error: Error, stdout: NodeBuffer, stderr: NodeBuffer) =>void ): ChildProcess;
numeric-error-propagation.hs https://github.com/acmeism/RosettaCodeData.git | Haskell | 21 lines
1data Error a = Error {value :: a, uncertainty :: a} deriving (Eq, Show)
2
3instance (Floating a) => Num (Error a) where
4	Error a ua + Error b ub = Error (a + b) (sqrt (ua ^ 2 + ub ^ 2))
5	negate (Error a ua) = Error (negate a) ua
5	negate (Error a ua) = Error (negate a) ua
6	Error a ua * Error b ub = Error (a * b) (abs (a * b * sqrt ((ua / a) ^ 2 + (ub / b) ^ 2))) -- I've factored out the f^2 from the square root
7	fromInteger a = Error (fromInteger a) 0
8
9instance (Floating a) => Fractional (Error a) where
10	fromRational a = Error (fromRational a) 0
10	fromRational a = Error (fromRational a) 0
11	Error a ua / Error b ub = Error (a / b) (abs (a / b * sqrt ((ua / a) ^ 2 + (ub / b) ^ 2))) -- I've factored out the f^2 from the square root
12
13instance (Floating a) => Floating (Error a) where
14	Error a ua ** Error c 0 = Error (a ** c) (abs (ua * c * a**c / a))
15
numeric-error-propagation.java https://github.com/acmeism/RosettaCodeData.git | Java | 88 lines
8        this.value = b.value;
9        this.error = b.error;
10    }
18        value+= b.value;
19        error = Math.sqrt(error * error + b.error * b.error);
20        return this;
29        value-= b.value;
30        error = Math.sqrt(error * error + b.error * b.error);
31        return this;
41        value*= b.value;
42        error = Math.sqrt(value * value * (error*error) / (oldVal*oldVal) +
43                                  (b.error*b.error) / (b.value*b.value));
55        value/= b.value;
56        error = Math.sqrt(value * value * (error*error) / (oldVal*oldVal) +
57                                  (b.error*b.error) / (b.value*b.value));
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21