PHP 8.4.6 Released!

gnupg_geterrorinfo

(PECL gnupg >= 1.5)

gnupg_geterrorinfoReturns the error info

Açıklama

gnupg_geterrorinfo(resource $identifier): array

Bağımsız Değişkenler

identifier

Gnupg tanıtıcısı, bir gnupg_init() çağrısından veya gnupg nesnesinden elde edilir.

Dönen Değerler

Returns an array with error info.

Örnekler

Örnek 1 Procedural gnupg_geterrorinfo() example

<?php
$res
= gnupg_init();
/ this is called without any error
print_r(gnupg_geterrorinfo($res));
?>

Yukarıdaki örneğin çıktısı:

array(4) {
  ["generic_message"]=>
  bool(false)
  ["gpgme_code"]=>
  int(0)
  ["gpgme_source"]=>
  string(18) "Unspecified source"
  ["gpgme_message"]=>
  string(7) "Success"
}

Örnek 2 OO gnupg_geterrorinfo() example

<?php
$gpg
= new gnupg();
/ error call
$gpg->decrypt('abc');
/ error info should be displayed
print_r($gpg->geterrorinfo());
?>

Yukarıdaki örneğin çıktısı:

array(4) {
  ["generic_message"]=>
  string(14) "decrypt failed"
  ["gpgme_code"]=>
  int(117440570)
  ["gpgme_source"]=>
  string(5) "GPGME"
  ["gpgme_message"]=>
  string(7) "No data"
}

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant