def generic(context, request):
    request.response.status_int = 500
    try:
        response = {'message': context.args[0]}
    except __HOLE__:
        response = {'message': 'Unknown error'}
    if request.registry.settings.get('rest_toolkit.debug'):
        response['traceback'] = ''.join(
                traceback.format_exception(*request.exc_info))
    return response
dataset/ETHPy150Open wichert/rest_toolkit/src/rest_toolkit/error.py/generic