[][src]Function arrayfire::register_error_handler

pub fn register_error_handler(cb_value: Callback)

Register user provided error handler


extern crate arrayfire;

use arrayfire::{AfError, Callback, info, register_error_handler};
use std::error::Error;

fn handle_error(error_code: AfError) {
    match error_code {
        AfError::SUCCESS => {}, /* No-op */
        _ => panic!("Error message: {}", error_code),

fn main() {
    //Registering the error handler should be the first call
    //before any other functions are called if your version
    //of error is to be used for subsequent function calls