Another inconclusive session: still nothing works, still making progress.
This commit is contained in:
parent
ef59563e25
commit
eed4711fee
35 changed files with 317 additions and 232 deletions
|
|
@ -6,6 +6,13 @@
|
|||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* wide characters
|
||||
*/
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
|
||||
|
||||
#include "memory/node.h"
|
||||
|
|
@ -17,7 +24,12 @@
|
|||
|
||||
#include "payloads/exception.h"
|
||||
|
||||
#include "ops/stack_ops.h"
|
||||
#include "ops/truth.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/**
|
||||
* @brief allocate an exception object, and, if successful, return a pointer
|
||||
|
|
@ -31,8 +43,7 @@
|
|||
* otherwise it will return a pointer to a new exception.
|
||||
*
|
||||
* @param message expected to be a string, but anything printable is accepted.
|
||||
* @param frame the stack frame in which the exception was `thrown`, if any.
|
||||
* @param meta metadata for this exception. Must be an assoc list, hashtable,
|
||||
b * @param meta metadata for this exception. Must be an assoc list, hashtable,
|
||||
* or `nil`
|
||||
* @param cause the exception that caused this exception to be `thrown`.
|
||||
*/
|
||||
|
|
@ -44,13 +55,13 @@ struct pso_pointer make_exception( struct pso_pointer frame_pointer) {
|
|||
struct pso_pointer cause = fetch_arg( frame, 2);
|
||||
|
||||
struct pso_pointer result =
|
||||
allocate( pointer_to_pso4( frame ), EXCEPTIONTAG, 3 );
|
||||
allocate( frame_pointer, EXCEPTIONTAG, 3 );
|
||||
|
||||
if ( !nilp( result ) && !exceptionp( result ) ) {
|
||||
if ( !c_nilp( result ) && !exceptionp( result ) ) {
|
||||
struct pso3 *object = ( struct pso3 * ) pointer_to_object( result );
|
||||
|
||||
object->payload.exception.message = message;
|
||||
object->payload.exception.stack = stackp( frame ) ? frame : nil;
|
||||
object->payload.exception.stack = stackp( frame_pointer ) ? frame_pointer : nil;
|
||||
object->payload.exception.meta = ( consp( meta )
|
||||
|| hashtabp( meta ) ) ? meta : nil;
|
||||
object->payload.exception.cause = exceptionp( cause ) ? cause : nil;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue