diff --git a/src/create.luau b/src/create.luau index 48b89b5..c059fbf 100644 --- a/src/create.luau +++ b/src/create.luau @@ -97,26 +97,6 @@ export type Instances = { ViewportFrame: ViewportFrame, Camera: Camera, WorldModel: WorldModel, - - -- interaction - ProximityPrompt: ProximityPrompt, - - -- value objs - BoolValue: BoolValue, - IntValue: IntValue, - NumberValue: NumberValue, - StringValue: StringValue, - ObjectValue: ObjectValue, - ColorValue: Color3Value, - VectorValue: Vector3Value, - CFrameValue: CFrameValue, - - -- styling - StyleSheet: StyleSheet, - StyleRule: StyleRule, - StyleDerive: StyleDerive, - StyleLink: StyleLink, - StyleQuery: StyleQuery, } export type function Properties(instance: type?) diff --git a/src/graph.luau b/src/graph.luau index fd22489..b85b66e 100644 --- a/src/graph.luau +++ b/src/graph.luau @@ -31,7 +31,14 @@ local function efn(err: string) end trace ..= "\nsource update stacktrace:" -return trace + return trace +end + +local function effect_traceback(err: unknown): string + local message = tostring(err) + -- Nested effect error already has full thread stack + if string.find(message, "^effect error:\n") then return message end + return `effect error:\n{debug.traceback(message, 2)}` end local function ycall(fn: (T) -> U, arg: T): (boolean, string|U) @@ -181,13 +188,13 @@ local function evaluate_node(node: Node) destroy_owned(node) push_scope(node) - local ok, new_value = pcall(node.effect :: (T) -> T, node.cache) + local ok, new_value = xpcall(node.effect :: (T) -> T, effect_traceback, node.cache) pop_scope() if not ok then table.clear(update_queue) update_queue.n = 0 - error(`effect error:\n{new_value}\n`, 0) + error(new_value, 0) end node.cache = new_value