‘exclude’ argument is not working with get_posts for a custom post type

‘exclude’ argument is not working with get_posts for a custom post type

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)