• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PHPOffice / PhpSpreadsheet / 28774268733

06 Jul 2026 07:10AM UTC coverage: 97.157% (-0.01%) from 97.167%
28774268733

Pull #4834

github

web-flow
Merge 22dd8078e into 0577c7488
Pull Request #4834: Add parallel Xlsx writing via pcntl_fork

189 of 200 new or added lines in 6 files covered. (94.5%)

48553 of 49974 relevant lines covered (97.16%)

385.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.0
/src/PhpSpreadsheet/Parallel/Backend/ParallelTaskError.php
1
<?php
2

3
namespace PhpOffice\PhpSpreadsheet\Parallel\Backend;
4

5
use Throwable;
6

7
/**
8
 * Serializable error container passed from child to parent via IPC.
9
 */
10
class ParallelTaskError
11
{
12
    private string $message;
13

14
    private int $code;
15

16
    private string $exceptionClass;
17

18
    private string $traceAsString;
19

20
    public function __construct(string $message, int $code = 0, string $exceptionClass = '', string $traceAsString = '')
3✔
21
    {
22
        $this->message = $message;
3✔
23
        $this->code = $code;
3✔
24
        $this->exceptionClass = $exceptionClass;
3✔
25
        $this->traceAsString = $traceAsString;
3✔
26
    }
27

NEW
28
    public static function fromThrowable(Throwable $e): self
×
29
    {
NEW
30
        return new self($e->getMessage(), (int) $e->getCode(), get_class($e), $e->getTraceAsString());
×
31
    }
32

33
    public function getMessage(): string
3✔
34
    {
35
        return $this->message;
3✔
36
    }
37

38
    public function getCode(): int
3✔
39
    {
40
        return $this->code;
3✔
41
    }
42

NEW
43
    public function getExceptionClass(): string
×
44
    {
NEW
45
        return $this->exceptionClass;
×
46
    }
47

NEW
48
    public function getTraceAsString(): string
×
49
    {
NEW
50
        return $this->traceAsString;
×
51
    }
52

53
    public function getSummary(): string
2✔
54
    {
55
        $summary = $this->exceptionClass !== '' ? "[{$this->exceptionClass}] {$this->message}" : $this->message;
2✔
56
        if ($this->traceAsString !== '') {
2✔
57
            $summary .= "\n" . $this->traceAsString;
2✔
58
        }
59

60
        return $summary;
2✔
61
    }
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc