layout | title | permalink |
---|---|---|
error |
NSError 404 - NSHipster |
404.html |
let domain = "{{ site.url | host }}"
let code = 404
let userInfo = [
NSLocalizedDescriptionKey:
"Requested page is too obscure, and probably does not exist.",
NSLocalizedRecoverySuggestionErrorKey:
"Go back to the mainstream site."
]
throw NSError(domain: domain, code: code, userInfo: userInfo)
NSString *domain = @"{{ site.url | host }}";
NSInteger code = 404;
NSDictionary *userInfo = @{
NSLocalizedDescriptionKey:
@"Requested page is too obscure, and probably does not exist.",
NSLocalizedRecoverySuggestionErrorKey:
@"Go back to the mainstream site."
};
NSError *error = [[NSError alloc] initWithDomain:domain
code:code
userInfo:userInfo];