Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1<h1 align=center>2 <a href="http://chaijs.com" title="Chai Documentation">3 <img alt="ChaiJS" src="http://chaijs.com/img/chai-logo.png">4 </a>5 <br>6 check-error7</h1>8 9<p align=center>10 Error comparison and information related utility for <a href="http://nodejs.org">node</a> and the browser.11</p>12 13## What is Check-Error?14 15Check-Error is a module which you can use to retrieve an Error's information such as its `message` or `constructor` name and also to check whether two Errors are compatible based on their messages, constructors or even instances.16 17## Installation18 19### Node.js20 21`check-error` is available on [npm](http://npmjs.org). To install it, type:22 23 $ npm install check-error24 25### Browsers26 27You can also use it within the browser; install via npm and use the `check-error.js` file found within the download. For example:28 29```html30<script src="./node_modules/check-error/check-error.js"></script>31```32 33## Usage34 35The primary export of `check-error` is an object which has the following methods:36 37* `compatibleInstance(err, errorLike)` - Checks if an error is compatible with another `errorLike` object. If `errorLike` is an error instance we do a strict comparison, otherwise we return `false` by default, because instances of objects can only be compatible if they're both error instances.38* `compatibleConstructor(err, errorLike)` - Checks if an error's constructor is compatible with another `errorLike` object. If `err` has the same constructor as `errorLike` or if `err` is an instance of `errorLike`.39* `compatibleMessage(err, errMatcher)` - Checks if an error message is compatible with an `errMatcher` RegExp or String (we check if the message contains the String).40* `getConstructorName(errorLike)` - Retrieves the name of a constructor, an error's constructor or `errorLike` itself if it's not an error instance or constructor.41* `getMessage(err)` - Retrieves the message of an error or `err` itself if it's a String. If `err` or `err.message` is undefined we return an empty String.42 43```js44import * as checkError 'check-error';45```46 47#### .compatibleInstance(err, errorLike)48 49```js50import * as checkError 'check-error';51 52const funcThatThrows = function() { throw new TypeError('I am a TypeError') };53let caughtErr;54 55try {56 funcThatThrows();57} catch(e) {58 caughtErr = e;59}60 61const sameInstance = caughtErr;62 63checkError.compatibleInstance(caughtErr, sameInstance); // true64checkError.compatibleInstance(caughtErr, new TypeError('Another error')); // false65```66 67#### .compatibleConstructor(err, errorLike)68 69```js70import * as checkError 'check-error';71 72const funcThatThrows = function() { throw new TypeError('I am a TypeError') };73let caughtErr;74 75try {76 funcThatThrows();77} catch(e) {78 caughtErr = e;79}80 81checkError.compatibleConstructor(caughtErr, Error); // true82checkError.compatibleConstructor(caughtErr, TypeError); // true83checkError.compatibleConstructor(caughtErr, RangeError); // false84```85 86#### .compatibleMessage(err, errMatcher)87 88```js89import * as checkError 'check-error';90 91const funcThatThrows = function() { throw new TypeError('I am a TypeError') };92let caughtErr;93 94try {95 funcThatThrows();96} catch(e) {97 caughtErr = e;98}99 100const sameInstance = caughtErr;101 102checkError.compatibleMessage(caughtErr, /TypeError$/); // true103checkError.compatibleMessage(caughtErr, 'I am a'); // true104checkError.compatibleMessage(caughtErr, /unicorn/); // false105checkError.compatibleMessage(caughtErr, 'I do not exist'); // false106```107 108#### .getConstructorName(errorLike)109 110```js111import * as checkError 'check-error';112 113const funcThatThrows = function() { throw new TypeError('I am a TypeError') };114let caughtErr;115 116try {117 funcThatThrows();118} catch(e) {119 caughtErr = e;120}121 122const sameInstance = caughtErr;123 124checkError.getConstructorName(caughtErr) // 'TypeError'125```126 127#### .getMessage(err)128 129```js130import * as checkError 'check-error';131 132const funcThatThrows = function() { throw new TypeError('I am a TypeError') };133let caughtErr;134 135try {136 funcThatThrows();137} catch(e) {138 caughtErr = e;139}140 141const sameInstance = caughtErr;142 143checkError.getMessage(caughtErr) // 'I am a TypeError'144```145 