esl/MongooseIM — pull request #187 by legoscia (2014-05-09 18:01:38+00:00)
Title: Always call erl_ddll:format_error on driver load failure

This is the difference between:

no case clause matching {error,{open_error,-10}}

and

{cannot_load_stringprep_drv,"dlopen(/Users/magnus/src/MongooseIM/dev/mongooseim_node1/lib/stringprep-1.0/priv/lib/stringprep_drv.so, 2): no suitable image found. Did find:\n\t/Users/magnus/src/MongooseIM/dev/mongooseim_node1/lib/stringprep-1.0/priv/lib/stringprep_drv.so: mach-o, but wrong architecture"}

The latter message helped me find and fix the problem quickly.