pub fn thread_error( ctx: Context<'_, '_, '_, '_, ThreadError<'_>>, error_code: u32, error_message: String, ) -> Result<()>