Better linking exception handling