import { i18n } from '@kbn/i18n' ; import { KbnError } from '../../../../kibana_utils/public' ; export class VislibError extends KbnError { constructor ( message ) { super ( message ) ; } displayToScreen ( handler ) { handler . error ( this . message ) ; } } export class InvalidLogScaleValues extends VislibError { constructor ( ) { super ( 'Values less than 1 cannot be displayed on a log scale' ) ; } } export class ContainerTooSmall extends VislibError { constructor ( ) { super ( 'This container is too small to render the visualization' ) ; } } export class PieContainsAllZeros extends VislibError { constructor ( ) { super ( 'No results displayed because all values equal 0.' ) ; } } export class NoResults extends VislibError { constructor ( ) { super ( i18n . translate ( 'visTypeVislib.vislib.errors.noResultsFoundTitle' , { defaultMessage : 'No results found' , } ) ) ; } }