Comparing version 0.2.3 to 0.2.4
{ | ||
"name":"law", | ||
"description":"Tools to create policy and validations for services.", | ||
"version":"0.2.3", | ||
"version":"0.2.4", | ||
"homepage":"http://github.com/TorchlightSoftware/law", | ||
@@ -11,6 +11,8 @@ "repository":"git://github.com/TorchlightSoftware/law.git", | ||
"dependencies":{ | ||
"coffee-script":"*" | ||
"coffee-script":"*", | ||
"tea-error":"*" | ||
}, | ||
"devDependencies":{ | ||
"mocha":"*", | ||
"torch":"*", | ||
"should":"*" | ||
@@ -17,0 +19,0 @@ }, |
@@ -197,2 +197,62 @@ # Law | ||
``` | ||
## Error codes | ||
Law provides standard subtypes of `Error`, enriched using the `tea-error` | ||
library (https://github.com/qualiancy/tea-error). This means a `properties` | ||
object can be attached to the `Error` instance upon construction, as well | ||
as an indicator of the function that the stack trace should start from. | ||
We provide a `LawError` subtype of `Error` that acts as a common parent to | ||
all the more specific error subtypes. Extensions to Law should extend this | ||
type to obtain the benefits of `tea-error`, as well as permitting distinction | ||
between instances of Law errors from application errors. | ||
### LawError | ||
Common parent type of errors within the Law library (and extensions). | ||
Endowed with extra metadata couresty `tea-error`. | ||
### FailedArgumentLookupError | ||
Unused. | ||
### InvalidArgumentError | ||
An argument passed to a Law service exists, but has failed a validation. | ||
Occurs at call time | ||
### InvalidArgumentsObjectError | ||
The `args` argument of a service call was not an instance of `object`. | ||
Occurs at call time. | ||
### InvalidServiceNameError | ||
A serviceName that appears in the policy file has no referent amongst the actual | ||
discovered services. Occurs when processing the policy file. | ||
### MissingArgumentError | ||
A required argument was not present in the `args` object passed to the service. | ||
Occurs at call time. | ||
### NoFilterArrayError | ||
Thrown when a (malformed) rule in the policy file does not have any filters. | ||
Occurs at setup time, when applying policy rules to services. | ||
### ServiceDefinitionNoCallableError | ||
A service definition did not provide a callable (instance of `function`). | ||
Occurs when when wrapping services at setup time. | ||
### ServiceDefinitionTypeError | ||
The service definition was neither a function nor a richer service definition | ||
object containing metadata and optional Law declarations. Occurs at setup time. | ||
### ServiceReturnTypeError | ||
The return value of a service (chained in a computed stack of services) is | ||
not an object. Occurs at call time. | ||
### UnresolvableDependencyError | ||
A particular dependency in a valid (resolvable) dependency category could | ||
not be resolved using the configuration given | ||
### UnresolvableDependencyTypeError | ||
A service declared an unresolvable dependency category. For example, if the | ||
resolver configuration doesn't define a way to resolve dependencies in a | ||
`services` category, this error would be thrown. Occurs at setup time, when | ||
resolving dependencies. | ||
## Further Reading | ||
@@ -199,0 +259,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57332
41
298
2
3
3
+ Addedtea-error@*
+ Addedparams@0.1.1(transitive)
+ Addedtea-error@0.2.0(transitive)
+ Addedtype-detect@0.1.2(transitive)