Add "throws LastError;" to native methods