Closed Romanm745 closed 2 years ago
Have you tried with the latest version in main
- tag 2.0.0-beta1
?
I installed the latest version, but now I can't cause application crash. In version 1.3, I simply made a mistake when transferring text with special characters, where there was a problem with allocating a sufficient amount of memory. Is there any way to artificially throw an exception in version 2.0.0?
BTW, error tracing does not work either. No file is generated. Of course, the trace parameter is set.
'trace' => SapConnection::TRACE_LEVEL_FULL,
Please provide a full example to reproduce, along with the exact PHP version your are using.
Below is a full example triggering an exception and logging to a trace file:
<?php
use \SAPNWRFC\Connection as SapConnection;
use \SAPNWRFC\Exception as SapException;
$config = [ /* ... */ ];
try {
// by default, the trace file is created in the current working directory.
// the location can be changed though:
SapConnection::setTraceDir(__DIR__);
$c = new SapConnection(array_merge($config, [
'trace' => SapConnection::TRACE_LEVEL_VERBOSE
]));
// this will throw an exception because the function module does not exist
$f = $c->getFunction('Z_NON_EXISTING_FM');
} catch (SapException $ex) {
echo "Exception: {$ex->getMessage()}\n";
}
Tested with the following versions:
PHP version: 8.0.2
php-sapnwrfc version: 2.0.0-beta1
NW RFC SDK version: 7500.0.8
Closing this for lack of a response.
Question
Hello, I have an exception catcher set up in my program, but I still can't catch any exceptions. Instead, I get a broken website ERR_EMPTY_RESPONSE. Sometimes when I test something, I just get a broken page and I don't know the reason.
Version | 1.3.0-41-g725240b -- | -- SAP NW RFC SDK | 7500.0.7Thank you for help.