@task
def celery_error(**kw):
 log.info('about to raise an exception from celery')
 raise RuntimeError('this is an exception from celery')

@ task def celery_error ( ** kw ) : log . info ( 'about to raise an exception from celery' ) raise RuntimeError ( 'this is an exception from celery' )
this task raises an exception from celery to test error logging and sentry hookup .