/**
 * NetworkOfflineError thrown when an action that required internet connection
 * but network was offline.
 */ export default class NetworkOfflineError extends Error { public origin : Error ; constructor ( error ) { if ( navigator . onLine === false ) { super ( "Network Error: You are currently offline." ) ; } else { super ( "Network Error: Please check your internet connection." ) ; } if ( Error . captureStackTrace ) { Error . captureStackTrace ( this , NetworkOfflineError ) ; } this . origin = error ; } }