Switched to narrow string exceptions for better compatibility with existing libraries