Q:

use mysql get diagnostics at another procedure

I wanna build a public err log procedure.  Mysql 5.7.2
I tried use get condition in that same procedure, works. 
I remember this way worked before, maybe old mysql version, or I changed setting.  right now, @errNo, @errMsg always NULL. 
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_err_log`()
BEGIN
    GET DIAGNOSTICS @cno = NUMBER;
    GET DIAGNOSTICS CONDITION 1 @errNo = MYSQL_ERRNO, @errMsg = MESSAGE_TEXT;
SELECT @errNo, @errMsg;
END

CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_test`()
BEGIN

    DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
    BEGIN 
        CALL sp_err_log();         
    END;

    select 1;
    select * from tbl_not_exist;
    select 2;
END

A:

< MySQL 5.7.2

13.6.7.7 The MySQL Diagnostics Area :: 13.6.7.7.3 How the Diagnostics Area is Populated
...
SQL statements clear and set the diagnostics area as follows:

When the server starts executing a statement after parsing it, it clears the diagnostics area for nondiagnostic statements that use tables. ... 

...

See db-fiddle. 
>= MySQL 5.7.2

13.6.7.7 The MySQL Diagnostics Area :: 13.6.7.7.3 How the Diagnostics Area is Populated
...
SQL statements clear and set the diagnostics area as follows:

When the server starts executing a statement after parsing it, it clears the diagnostics area for nondiagnostic statements. ( Before MySQL 5.7.2, the server clears the diagnostics area for nondiagnostic statements that use tables.) ... 

...

See db-fiddle. 
Possible alternative solution (>= MySQL 5.7.2):
DELIMITER //

CREATE PROCEDURE `sp_err_log`(
  `_MYSQL_ERRNO` INT,
  `_MESSAGE_TEXT` TEXT
)
BEGIN
  SELECT
    `_MYSQL_ERRNO`,
    `_MESSAGE_TEXT`;
END//

CREATE PROCEDURE `sp_test`()
BEGIN
  DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
  BEGIN
    DECLARE
      `_NUMBER`,
      `_MYSQL_ERRNO` INT;
    DECLARE
      `_MESSAGE_TEXT` TEXT;
    GET STACKED DIAGNOSTICS `_NUMBER` = NUMBER;
    GET STACKED DIAGNOSTICS CONDITION `_NUMBER`
      `_MYSQL_ERRNO` = MYSQL_ERRNO,
      `_MESSAGE_TEXT` = MESSAGE_TEXT;
    CALL `sp_err_log`(
      `_MYSQL_ERRNO`,
      `_MESSAGE_TEXT`
    );
  END;
  SELECT 1;
  SELECT NULL
  FROM `tbl_not_exist`;
  SELECT 2;
END//

DELIMITER ;

See db-fiddle.