()
| 31 | |
| 32 | class ErrorDebug extends Component<{ error: any }> { |
| 33 | render() { |
| 34 | const { error } = this.props; |
| 35 | let title = String(error.rawError || error.message || error); |
| 36 | let detail = String(error.longMessage || error.rawError || ""); |
| 37 | const style: any = { |
| 38 | width: "100%", |
| 39 | height: "100%", |
| 40 | position: "absolute", |
| 41 | top: 0, |
| 42 | left: 0, |
| 43 | padding: "1em", |
| 44 | background: "#a00", |
| 45 | color: "#fff", |
| 46 | fontSize: "12px", |
| 47 | lineHeight: "1.2em", |
| 48 | fontStyle: "normal", |
| 49 | fontWeight: "normal", |
| 50 | fontFamily: "monospace", |
| 51 | overflow: "auto", |
| 52 | }; |
| 53 | const titleStyle = { |
| 54 | fontWeight: "bold" as const, |
| 55 | marginBottom: "1em", |
| 56 | }; |
| 57 | const detailStyle = { |
| 58 | whiteSpace: "pre" as const, |
| 59 | }; |
| 60 | return ( |
| 61 | <div style={style}> |
| 62 | <div style={titleStyle}>{title}</div> |
| 63 | <div style={detailStyle}>{detail}</div> |
| 64 | </div> |
| 65 | ); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | export default class GLViewDOM extends Component< |
nothing calls this directly
no outgoing calls
no test coverage detected