(
operation: () => Promise<MemoryCommandResult>
)
| 580 | } |
| 581 | |
| 582 | private async runCommand( |
| 583 | operation: () => Promise<MemoryCommandResult> |
| 584 | ): Promise<MemoryCommandResult> { |
| 585 | try { |
| 586 | return await operation(); |
| 587 | } catch (error) { |
| 588 | if (error instanceof MemoryCommandError) { |
| 589 | return { success: false, error: error.message }; |
| 590 | } |
| 591 | return { success: false, error: `Memory operation failed: ${getErrorMessage(error)}` }; |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | /** |
| 596 | * Resolve a parsed path to its store with containment verified. |
no test coverage detected