[android-components](../../index.md) / [mozilla.components.browser.errorpages](../index.md) / [ErrorPages](index.md) / [createErrorPage](./create-error-page.md)

# createErrorPage

`fun createErrorPage(context: <ERROR CLASS>, errorType: `[`ErrorType`](../-error-type/index.md)`, uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`? = null, @RawRes htmlResource: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = R.raw.error_pages, @RawRes cssResource: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` = R.raw.error_style): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/browser/errorpages/src/main/java/mozilla/components/browser/errorpages/ErrorPages.kt#L20)

Load and generate error page for the given error type and html/css resources

